i've just started with renpy and I'm making some simple scripts to test what i want and how to use it.
After deleting my previous attempt, i've started with a new layout, keeping my variables in one file, my characters in another and so on. From what i've read ( and tested in my previous experiment) that should work.
Anyways, i have:
A .rpy file with my variables, which just contains :
Code: Select all
$ari_base = 0Code: Select all
label start:
ari "Welcome!"
menu:
"what do you want to do"
"adding 1 stat":
$ari_base += 1
ari "check now"
jump start
"decrease 1 stat.":
$ari_base -= 1
ari "check now"
jump start
"stat value":
ari "[ari_base]"
jump startI'm sorry, but an uncaught exception occurred.
Code: Select all
While running game code:
File "game/script.rpy", line 10, in script
$ari_base += 1
File "game/script.rpy", line 10, in <module>
$ari_base += 1
NameError: name 'ari_base' is not definedSide note, how do i give the ari_base a minimum and maximum value? Tried the following:
Code: Select all
$ari_base =max(min(0, 10), 0)Thanks in advance!