- Mar 13, 2023
- 4
- 5
I'm attempting to change the text properties of a character's name using styles.
I then update my character string parameters to properly reflect those style changes:
Upon running the game, I receive this error:
Do I need to define my style in the same script file as my defined characters? Is Ren'py loading script.rpy before screens.rpy, therefore trying to define my characters before my styles? Not quite sure what's going on here.
I then update my character string parameters to properly reflect those style changes:
Upon running the game, I receive this error:
Python:
While running game code:
File "game/script.rpy", line 6, in script
define unknownDev = Character("Developer", color="#AFAFAF", style=characterTitles)
File "game/script.rpy", line 6, in script
define unknownDev = Character("Developer", color="#AFAFAF", style=characterTitles)
File "game/script.rpy", line 6, in <module>
define unknownDev = Character("Developer", color="#AFAFAF", style=characterTitles)
NameError: name 'characterTitles' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "C:\Users\TheRe\Desktop\Applications\renpy-8.0.0-sdk\renpy\bootstrap.py", line 277, in bootstrap
renpy.main.main()
File "C:\Users\TheRe\Desktop\Applications\renpy-8.0.0-sdk\renpy\main.py", line 558, in main
renpy.game.context().run(node)
File "game/script.rpy", line 6, in script
define unknownDev = Character("Developer", color="#AFAFAF", style=characterTitles)
File "/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/site-packages/future/utils/__init__.py", line 441, in raise_
File "game/script.rpy", line 6, in script
define unknownDev = Character("Developer", color="#AFAFAF", style=characterTitles)
File "C:\Users\TheRe\Desktop\Applications\renpy-8.0.0-sdk\renpy\ast.py", line 2441, in execute
self.set()
File "C:\Users\TheRe\Desktop\Applications\renpy-8.0.0-sdk\renpy\ast.py", line 2455, in set
value = renpy.python.py_eval_bytecode(self.code.bytecode)
File "C:\Users\TheRe\Desktop\Applications\renpy-8.0.0-sdk\renpy\python.py", line 1085, in py_eval_bytecode
return eval(bytecode, globals, locals)
File "game/script.rpy", line 6, in <module>
define unknownDev = Character("Developer", color="#AFAFAF", style=characterTitles)
NameError: name 'characterTitles' is not defined
Last edited: