I want my players can choose the langage in the main page with imagebutton so here is the code:
Code: Select all
imagebutton idle "gui/bouton_menu/eng.png" hover "gui/bouton_menu/eng_hover.png" selected_idle "gui/bouton_menu/eng_selected.png" selected_hover "gui/bouton_menu/eng_hover_selected.png" action SetVariable("persistent.lang","english") xpos 900 ypos 50
I init my persistent variable like this :
Code: Select all
init python :
persistent.lang = "english"
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "renpy/common/00action_data.rpy", line 50, in get_selected
return getattr(self.object, self.field) == self.value
AttributeError: 'StoreModule' object has no attribute 'persistent.lang'
Windows-8-6.2.9200
Ren'Py 6.99.14.1.3218
debugging version 0.3.0
Wed Mar 07 14:31:57 2018