[solved]IndexError: string index out of range?

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
User avatar
cookiestruck
Regular
Posts: 51
Joined: Sun Jul 08, 2012 10:22 am
Tumblr: cookiestruck
Deviantart: cookiestruck
Location: Somewhere in Asia.
Contact:

[solved]IndexError: string index out of range?

#1 Post by cookiestruck » Tue Jul 10, 2012 9:50 am

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
Last edited by cookiestruck on Wed Jul 11, 2012 8:29 am, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 2981
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: IndexError: string index out of range?

#2 Post by Alex » Tue Jul 10, 2012 10:57 am

What are the first 10 lines in basics.rpy?

User avatar
cookiestruck
Regular
Posts: 51
Joined: Sun Jul 08, 2012 10:22 am
Tumblr: cookiestruck
Deviantart: cookiestruck
Location: Somewhere in Asia.
Contact:

Re: IndexError: string index out of range?

#3 Post by cookiestruck » Wed Jul 11, 2012 1:44 am

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= ""

User avatar
PyTom
Ren'Py Creator
Posts: 15893
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: IndexError: string index out of range?

#4 Post by PyTom » Wed Jul 11, 2012 1:57 am

The empty strings are confusing Ren'Py.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
cookiestruck
Regular
Posts: 51
Joined: Sun Jul 08, 2012 10:22 am
Tumblr: cookiestruck
Deviantart: cookiestruck
Location: Somewhere in Asia.
Contact:

Re: IndexError: string index out of range?

#5 Post by cookiestruck » Wed Jul 11, 2012 8:30 am

PyTom wrote:The empty strings are confusing Ren'Py.
Oh.. so that's the problem... Thanks ^^

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot]