I wanted to put an image into my game but don’t know if I’m doing it right. I put the jpg image into the mygame folder and put in the code below where I wanted the image but the Quicktest comes up with an error that the file doesn’t exist and if I test the game manually the image doesn’t appear.
Looking at the wiki may prove useful if you haven’t already. And IIRC quicktest/randomtest isn’t equipped to show images. You’d have to use Dashingdon to test that out.
That’s because Choicescript is drawing from the text files only. You need to use Dashingdon and upload whatever image files you need in order to view the pictures.
So I assume then you are saying I have to take that piece of code out to test it. Then my other questions is why can’t i see the image when I manually play the game?
Convert the file to png and be sure to check that the image is inside your my game folder. Png and gif are the best formats to use both in game and in dashingdon. Dashingdon limits the size file so be sure to check out pages to compress the image accordingly
Don’t know what kind of computer you’re using, but make sure you’re actually seeing the file extension, not just assuming it.
Some computers do not distinguish between .jpg and .jpeg, so that could be why the name of the file you’re using doesn’t match.
Lastly, try renaming the image file something completely different that is all lowercase and no special symbols (i.e. don’t use a “_”) and see if that fixes the problem.
And as @poison_mara said, make sure your image file isn’t too gigantic as that might be what’s causing the “blank square” to pop up as it’s simply too large to load. There are free websites online that can help you resize an image.
Your code as shown above is fine. It’s just a question of getting your computer to find that rascally file!