Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hey, this post was a long time ago, but I can't figure something out: when I try to make a menu option for changing the languages, I get an error where it says that it expected a statement in the line that says renpy.change_language(None).

(+1)

No worries! I will try to help as I'm able. There's a pretty good chance my code has become outdated, but let's see what we  can figure out!


So according to this renpy documentation page

renpy.change_language(language, force=False)
Changes the current language to language, which can be a string or None to use the default language.

Have you changed "language" (the brackets) to the new language on that menu?

(+2)

I've tried that now. It didn't work. I apologise: I should have been more specific. The syntax error of 'expected statement' appeared in all instances where I used the renpy.change_language() fxn.

(+1)

No worries! Would you be able to share a snippet of the code? Hopefully looking at it might clue me in to the issue. 

(+1)

renpy.change_language(language, force=False)

label language_choose:
menu:
'English':
renpy.change_language(None)
'toki pona':
renpy.change_language(tokipona)
$ renpy.utter_restart()

Is that enough? Just tell me if you want more.