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.
-
Guest
#1
Post
by Guest » Sat Nov 29, 2008 3:55 am
I read the tutorial, played the game, and I'm not a n00b when it comes to scripting. I have most of the features down, but I'm having a bit of trouble. Okay, here is my game script.
Code: Select all
label start:
scene bg background
show person guy
e "You're some punk kid in high school"
e "Yeah, so... do something"
e "C'mon! Do something already!"
show person girl
g "Hi! How's it going?"
menu:
"Go away!":
jump ok
"Go die!":
jump ok2
label ok:
scene bg background
show person girl
g "Okay. Bye!"
e "You won. Congratulations!"
return
label ok2:
scene bg background
show person girl
g "Maybe I will!"
e "You won! Congratulations!"
return
And here's the traceback I keep getting
Code: Select all
I'm sorry, but errors were detected in your script. Please correct the
errors listed below, and try again.
On line 30 of C:\Documents and Settings\Schenk\Desktop\renpy-6.8.0-sdk\renpy-6.8.0\Lol First/game/script.rpy: menu statement expects a non-empty block.
menu:
^
On line 31 of C:\Documents and Settings\Schenk\Desktop\renpy-6.8.0-sdk\renpy-6.8.0\Lol First/game/script.rpy: expected statement.
"Go away!":
^
On line 34 of C:\Documents and Settings\Schenk\Desktop\renpy-6.8.0-sdk\renpy-6.8.0\Lol First/game/script.rpy: expected statement.
"Go die!":
^
On line 35 of C:\Documents and Settings\Schenk\Desktop\renpy-6.8.0-sdk\renpy-6.8.0\Lol First/game/script.rpy: jump statement does not expect a block. Please check the indentation of the line after this one.
jump ok2
^
Ren'Py Version: Ren'Py 6.8.0f
So, um... I did my spacing and indentations perfectly, at least I think I did. Help me?
-
Goonka
- Newbie
- Posts: 1
- Joined: Sat Nov 29, 2008 3:52 am
-
Contact:
#2
Post
by Goonka » Sat Nov 29, 2008 3:59 am
Heh heh! I forgot to login! Sorry for the double post by the way.
-
Samu-kun
- King of Moé
- Posts: 2262
- Joined: Mon Sep 03, 2007 3:49 pm
- Organization: Love in Space Inc
- Location: United States
-
Contact:
#3
Post
by Samu-kun » Sat Nov 29, 2008 4:35 am
Try this.
Code: Select all
label start:
scene bg background
show person guy
e "You're some punk kid in high school"
e "Yeah, so... do something"
e "C'mon! Do something already!"
show person girl
g "Hi! How's it going?"
menu:
"Go away!":
jump ok
"Go die!":
jump ok2
label ok:
scene bg background
show person girl
g "Okay. Bye!"
e "You won. Congratulations!"
return
label ok2:
scene bg background
show person girl
g "Maybe I will!"
e "You won! Congratulations!"
return
-
filsduloup
- Regular
- Posts: 65
- Joined: Thu Aug 28, 2008 3:00 pm
- Projects: Alchimical Girl -Homuncule-
- Location: France
-
Contact:
#4
Post
by filsduloup » Tue Dec 02, 2008 7:21 am
The renpy's langage uses a order system both horizontally and vertically.
bad exemple:
Code: Select all
label lovescene:
"i love you mike !"
Code: Select all
label lovescene:
"i love you mike !"
good exemple:
Code: Select all
label lovescene:
"i love you mike !"
-
Twar3Draconis
- Regular
- Posts: 129
- Joined: Thu Apr 19, 2007 12:07 am
- Location: Michigan, United States, Terra
-
Contact:
#5
Post
by Twar3Draconis » Tue Dec 02, 2008 8:03 am
Yep. Python (Or RenPy), unlike most languages, does NOT ignore whitespace. So, clean code is enforced, but it's good practice anyway.
Users browsing this forum: Google [Bot]