Code: Select all
#############################################################################
#Stats Menu
#A Screen For Your Stats and Stuff
screen button:
vbox xalign 0.1 yalign 0.1:
textbutton "Show Stats" action ui.callsinnewcontext("aff_screen_label")
screen aff_screen:
frame:
has vbox
hbox:
label "Jack:" xminimum 100
bar range affection_max value bob_points xmaximum 500
hbox:
label "Joey:" xminimum 100
bar range affection_max value joey_points xmaximum 500
textbutton "Return" action Return()
label aff_screen_label:
call screen aff_screen
return
Code: Select all
label start:
# Show a background. This uses a placeholder by default, but you can
# add a file (named either "bg room.png" or "bg room.jpg") to the
# images directory to show it.
scene bg room
# This shows a character sprite. A placeholder is used, but you can
# replace it by adding a file named "eileen happy.png" to the images
# directory.
show eileen happy
# These display lines of dialogue.
"Hello, world."
$ affection_max = 100
$ jack_points = 60
$ joey_points = 20
show screen button
e "You've created a new Ren'Py game."
e "Once you add a story, pictures, and music, you can release it to the world!"
# This ends the game.
return
I am very, very confused and I have no idea how to fix this. AFAIK, I followed the tutorial's instructions to the letter and everything just...broke.I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/screens.rpy", line 1416, in script
call screen aff_screen
File "renpy/common/000statements.rpy", line 471, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "game/screens.rpy", line 1403, in execute
screen aff_screen:
File "game/screens.rpy", line 1403, in execute
screen aff_screen:
File "game/screens.rpy", line 1404, in execute
frame:
File "game/screens.rpy", line 1405, in execute
has vbox
File "game/screens.rpy", line 1407, in execute
hbox:
File "game/screens.rpy", line 1409, in execute
bar range affection_max value bob_points xmaximum 500
File "game/screens.rpy", line 1409, in keywords
bar range affection_max value bob_points xmaximum 500
NameError: name 'bob_points' is not defined