Page 1 of 1

[solved]IndexError: string index out of range?

Posted: Tue Jul 10, 2012 9:50 am
by cookiestruck
I always get this D:
I'm sorry, but an exception occured while executing your Ren'Py
script.

IndexError: string index out of range

While executing init code:
- script at line 4 of C:\Program Files\renpy-6.9.0\Untitled/game/basics.rpy

-- Full Traceback ------------------------------------------------------------

File "C:\Program Files\renpy-6.9.0\renpy\bootstrap.py", line 256, in bootstrap
File "C:\Program Files\renpy-6.9.0\renpy\main.py", line 253, in main
File "C:\Program Files\renpy-6.9.0\renpy\execution.py", line 217, in run
File "C:\Program Files\renpy-6.9.0\renpy\ast.py", line 629, in execute
File "C:\Program Files\renpy-6.9.0\renpy\exports.py", line 131, in image
File "C:\Program Files\renpy-6.9.0\renpy\easy.py", line 67, in displayable
IndexError: string index out of range

While executing init code:
- script at line 4 of C:\Program Files\renpy-6.9.0\Untitled/game/basics.rpy

Ren'Py Version: Ren'Py 6.9.0h

Re: IndexError: string index out of range?

Posted: Tue Jul 10, 2012 10:57 am
by Alex
What are the first 10 lines in basics.rpy?

Re: IndexError: string index out of range?

Posted: Wed Jul 11, 2012 1:44 am
by cookiestruck
Alex wrote:What are the first 10 lines in basics.rpy?
It's
init:

#Backgrounds
image bg old house=""
image bg old room=""
image bg new room="newroom.jpeg"
image bg new house=""
image bg school = ""
image bg classroom= ""
image bg hallway= ""

Re: IndexError: string index out of range?

Posted: Wed Jul 11, 2012 1:57 am
by PyTom
The empty strings are confusing Ren'Py.

Re: IndexError: string index out of range?

Posted: Wed Jul 11, 2012 8:30 am
by cookiestruck
PyTom wrote:The empty strings are confusing Ren'Py.
Oh.. so that's the problem... Thanks ^^