Page 1 of 1

the "define" variable not implemented at the start of the game

Posted: Fri Jun 24, 2022 3:29 pm
by Mirrodin
Hi guys,

Start debugging my game after 2 years, and at the launch I have this error. (I just updated RENPY) so now maybe I need another declarative type.

in my init.rpy :

define version_game = "0.3.22.d"

in option.rpy :

define config.name = _("The Pleasuremancer "+str(version_game)+" - Stable version")

And with the update of RENPY I have this error :

'm sorry, but an uncaught exception occurred.

While parsing C:\***\Pleasuremancer v674/game/Init_globale.rpy.
File "game/options.rpy", line 15, in <module>
define config.name = _("The Pleasuremancer "+str(version_game)+" - Gold edition - Stable version")
NameError: name 'version_game' is not defined

What is the new declarative ?

Thanks

Re: the "define" variable not implemented at the start of the game

Posted: Fri Jun 24, 2022 5:31 pm
by Ocelot
Make sure that first define has lower init order than second one.

Re: the "define" variable not implemented at the start of the game

Posted: Fri Jun 24, 2022 10:24 pm
by strayerror
I believe the config store is treated specially in define statements and hoisted to be some of the first things defined. I'd suggest storing your version in config.version instead.