Coding problems.
Posted: Wed Jan 09, 2019 1:53 am
I am having trouble giving affection points to characters in my game. In earlier lines of code, it works for some characters, but for the two I am trying to add, it is not working. It keeps coming up with the same 'undefined' message. I am having trouble trying to figure out what is wrong. Any help would be appreciated.
This is what I typed in for the new character.
This is the error message that I am getting
This is what I typed in for the new character.
Code: Select all
menu:
"William Shakespeare.":
$jane_aff += 5
jump problem1
"Hemmingway?":
$jane_aff -= 2
jump problem2
"I don't know...":
$jane_aff = 0
jump problem3
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 343, in script
$jane_aff -= 2
File "game/script.rpy", line 343, in <module>
$jane_aff -= 2
NameError: name 'jane_aff' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 343, in script
$jane_aff -= 2
File "D:\renpy-7.1.1-sdk\renpy\ast.py", line 882, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "D:\renpy-7.1.1-sdk\renpy\python.py", line 1913, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 343, in <module>
$jane_aff -= 2
NameError: name 'jane_aff' is not defined
Windows-7-6.1.7601-SP1
Ren'Py 7.1.1.929
The Clusterf*** that is my Love-Life 1.0
Wed Jan 09 13:40:35 2019