Hi I am EXTREMELY new... as in, I've been using renpy for like an hour and a half. I've gotten an error in every line of dialog and I don't know why... if someone could help me out I would appreciate it a lot.
I'm going to copy and paste my text then the error text.
mine:
label start:
define c = Character(“Claudia”)
scene bg black
c “It didn’t take me long to pack up my stuff.”
c “I decided to give away most of it to charity and throw out what I couldn’t donate.”
c “I wanted to leave my memories of this place behind too.”
scene bg aptstreet
with Dissolve(.5)
pause .5
c “After everything I went through… I needed a fresh start. I rented out a shabby apartment in the city.”
c “It wasn’t much to look at and it certainly wasn’t the safest neighbourhood in the city, but I was determined to make this place my new home.”
show claudia at left
with Dissolve(.5)
c “Moving in didn’t take long.”
show claudia sad at left
c “I…”
c “I just hope things will be better here.”
and here is the errors:
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
File "game/script.rpy", line 7: expected statement.
c “It didn’t take me long to pack up my stuff.”
^
File "game/script.rpy", line 8: expected statement.
c “I decided to give away most of it to charity and throw out what I couldn’t donate.”
^
File "game/script.rpy", line 9: expected statement.
c “I wanted to leave my memories of this place behind too.”
^
File "game/script.rpy", line 16: expected statement.
c “After everything I went through… I needed a fresh start. I rented out a shabby apartment in the city.”
^
File "game/script.rpy", line 17: expected statement.
c “It wasn’t much to look at and it certainly wasn’t the safest neighbourhood in the city, but I was determined to make this place my new home.”
^
File "game/script.rpy", line 22: expected statement.
c “Moving in didn’t take long.”
^
File "game/script.rpy", line 26: expected statement.
c “I…”
^
File "game/script.rpy", line 27: expected statement.
c “I just hope things will be better here.”
^
Expected statement error - dialog
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.
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.
- SpicyMayo1429
- Regular
- Posts: 36
- Joined: Tue Mar 20, 2018 11:23 am
- Contact:
Re: Expected statement error - dialog
your issue is that when you defined your character, within the brackets you only need ' but you have ". It should look like this.
Code: Select all
define c = Character ('Claudia')
Re: Expected statement error - dialog
hi, I tried that but it didn't fix the error. thanks for letting me know i defined the character wrongSpicyMayo1429 wrote: ↑Tue May 22, 2018 11:13 pm your issue is that when you defined your character, within the brackets you only need ' but you have ". It should look like this.Code: Select all
define c = Character ('Claudia')
Re: Expected statement error - dialog
Are you writing your code in MS Word or Wordpad something? Your straight quotes (" and ') have all been converted to smart quotes (“” ’), which isn't understood by python / renpy as string declarators.
Try using Atom - which comes with Renpy free - as your text editor, or any other "programmers" text editors that won't auto-format your quotes into smart quotes.
Try using Atom - which comes with Renpy free - as your text editor, or any other "programmers" text editors that won't auto-format your quotes into smart quotes.
Re: Expected statement error - dialog
This is actually incorrect - both double and single quotes work for python and renpy - the language is agnostic about which quotes are used for string declarations. However you can use double quotes more easily within single quotes, and vice versa without having to escape them:SpicyMayo1429 wrote: ↑Tue May 22, 2018 11:13 pm your issue is that when you defined your character, within the brackets you only need ' but you have ". It should look like this.Code: Select all
define c = Character ('Claudia')
Code: Select all
'"This is in a pair of double quotes"'
"'This is in a pair of single quotes'"
"\"This is in a pair of escaped double quotes because I used double quotes for the string\""
'\'This is in a pair of escaped single quotes because I used single quotes for the string\''
Who is online
Users browsing this forum: No registered users