When the game runs, I'd like it to check to see if one of two files exists. If they DON'T exist, I'd like the game to change the language to None (English.)
I realize the engine defaults to None anyway, but this is just in case a player has yanked out the translation folder and hasn't put it back in. If I don't do this, it seems some of the fonts go wonky.
For the purposes of simplification:
Code: Select all
init -2 python:
if not renpy.loadable("spanish.ttf") or not renpy.loadable("spanish.otf"):
renpy.change_language(None)
What should the syntax be?While running game code:
File "game/translation.rpy", line 1, in script
init -2 python:
File "game/translation.rpy", line 5, in <module>
renpy.change_language(None)
TypeError: argument of type 'NoneType' is not iterable
Thanks!