This site requires JavaScript, please enable it in your browser!
Greenfoot back
csrgamer
csrgamer wrote ...

2014/10/17

System cannot find the file specified (set image)

csrgamer csrgamer

2014/10/17

#
I keep trying to change the image (PNG) of one of my actors and it gives me this error message (followed by a huge stream of block text error stuff) and replaces the actor image with the little green Greenfoot foot. What's weird is that it deletes the original file and then says it can't find the file. (As far as I can tell) I'll save it to the image folder in my scenario, browse in the set image thing, find it, click it, get the error, and the image is gone. java.io.FileNotFoundException: C:\Users\Claymore\Desktop\Newgameidea\Snake1.3\images\food.png (The system cannot find the file specified) What am I doing wrong? I've done this plenty of times before without this issue. There are no files in the folder other than PNG images for the background and other actors.
ILOVELABRADORS ILOVELABRADORS

2014/10/17

#
Did you check if it's in the finder? Or if you know how, you can use the terminal. By the way what do you mean by
csrgamer wrote...
I'll save it to the image folder in my scenario, browse in the set image thing, find it, click it, get the error, and the image is gone.
If it's not there, then that's probably the reason why it won't show. I've had this problem a few weeks ago, and it took me a long time to figure out what was happening.
csrgamer csrgamer

2014/10/17

#
It's not in the finder even after I use "import from file." I mean that I create the image in Photoshop and save it to the folder labeled "images" that is automatically created inside the scenario folder when you create a new scenario. After that I go into Greenfoot and select it using "import from file" and it gives me the error. When I return to the folder, the image is gone even though it was there before I told Greenfoot to use it. I just tried saving it to my desktop and opening it from there and it works, but of course it isn't in the Scenario Images finder because it's not in the folder. (And I want it to be, but the aforementioned error occurs when it's in that folder) Edit: It just added the image to the finder area after I redid everything and uploaded it from my desktop. I still can't upload an image from the image folder without getting the error etc. Edit 2: But it's there before I try to upload it. It's as if Greenfoot deletes the image when it gives me the error.
Super_Hippo Super_Hippo

2014/10/17

#
Does it happen with every image or just with this one? Try to set the image manually instead of right-clicking the class.
setImage("food.png");
csrgamer csrgamer

2014/10/17

#
It happens with just that one image. Using the code worked perfectly though, and now I can even select it out of the set image finder. Thanks!
You need to login to post a reply.