I've tried to set up a points system for 'romance' points.
If you get 0-2 you get the friendship ending, 3-5 is the normal romance ending and 6 is special romance.
At the start of my code I've written;
Code: Select all
$ Rpoints = 0
Code: Select all
menu:
"Let's take it easy for now.":
jump take_it_easy
"Don't worry, we will.":
jump dw_we_will
"Yeah! Come on, let's go train!":
$ Rspoints += 1
jump lets_go_train
But I keep getting the error;
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 2475, in script
File "game/script.rpy", line 2475, in python
NameError: name 'romance_points' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "/Users/Mich/Downloads/renpy-6.14.1-sdk/renpy/execution.py", line 266, in run
node.execute()
File "/Users/Mich/Downloads/renpy-6.14.1-sdk/renpy/ast.py", line 646, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "/Users/Mich/Downloads/renpy-6.14.1-sdk/renpy/python.py", line 1172, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 2475, in <module>
$ romance_points += 1
NameError: name 'romance_points' is not defined
I've seen variants of this asked already, but I can't seem to apply it to my game, sorry in advance if this is considered spam.