Image error - tried everything, still won't show (Closed)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
frustratedwriter

Image error - tried everything, still won't show (Closed)

#1 Post by frustratedwriter »

It's my first time using ren'py. I literally don't know why the image can't be found. I already saved the image inside the game's provided image folder, i used the exact name and it still won't work. please help?

Code: Select all

# Background
 image forest = 'bg_forest.jpg'
 label start:
 scene forest
 
the error :
while loading <'image'bg_forest.jpg'>
file "game/script.rpy",line 14, in script
"yup"
IO error: couldn't find file 'bg_forest.jpg'
Last edited by frustratedwriter on Mon Jul 27, 2015 10:19 am, edited 1 time in total.

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Image error - tried everything, still won't show

#2 Post by mobychan »

You have to add the "images" when you put you image in that folder:

Code: Select all

# Background
image forest = 'images/bg_forest.jpg'
label start:
    scene forest

frustratedwriter

Re: Image error - tried everything, still won't show

#3 Post by frustratedwriter »

Oh my glob, thank you very much. I actually thought of doing that before, but I was all like " yeah, sure, as if adding the word images would magically fix this error". I ridiculed myself for thinking that,good job brain -___-. Anyway, thank you again ( ̄▽ ̄)

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Image error - tried everything, still won't show

#4 Post by mobychan »

No problem^^

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Image error - tried everything, still won't show

#5 Post by PyTom »

The whole point of the images directory is that you don't need the image statement anymore. You can simply put forest.jpg in the images directory, and then do

Code: Select all

label start:
    scene forest
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: No registered users