Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
I've been having problems since I tried In-line translation for my Visual Novel project. I've been working with renpy version 6.9.1 then switched to 6.9.3 but I still got this error:
I'm sorry, but an exception occured while executing your Ren'Py
script.
UnicodeDecodeError:
While running game code:
- script at line 282 of K:\renpy-6.9.3\La Llei de Mitjanit/game/script.rpy
-- Full Traceback ------------------------------------------------------------
File "K:\renpy-6.9.3\renpy\bootstrap.py", line 260, in bootstrap
File "K:\renpy-6.9.3\renpy\main.py", line 308, in main
File "K:\renpy-6.9.3\renpy\main.py", line 92, in run
File "K:\renpy-6.9.3\renpy\execution.py", line 230, in run
File "K:\renpy-6.9.3\renpy\ast.py", line 341, in execute
File "K:\renpy-6.9.3\renpy\exports.py", line 507, in say
File "K:\renpy-6.9.3\renpy\character.py", line 523, in __call__
File "K:\renpy-6.9.3\renpy\python.py", line 950, in py_eval
File "K:\renpy-6.9.3\renpy\python.py", line 219, in py_compile
UnicodeDecodeError:
While running game code:
- script at line 282 of K:\renpy-6.9.3\La Llei de Mitjanit/game/script.rpy
Ren'Py Version: Ren'Py 6.9.3c
I've been trying to translate it to three different languages.
Even if it's not related to this so far I've only noticed as a strange thing that when I write "None" it appears in black font when in the example of In-line translation "None" appears in brown font "[/color]None"
init:
$ en = Character (None, condition='lang == "english"')
$ sp = Character (None, condition='lang == "castellano"')
$ ca = Character (None, condition='lang == u"català"')
I suspect somebody is stealing my internet identity so don't believe everything I tell you via messages. I don't post or send messages anymore so don't believe anything I tell you via messages or posts.
init:
$ en = Character (None, condition='lang == "english"')
$ sp = Character (None, condition='lang == "castellano"')
$ ca = Character (None, condition='lang == u"català"')
init:
$ en = Character (None, condition='lang == "english"')
$ sp = Character (None, condition='lang == "castellano"')
$ ca = Character (None, condition=u'lang == u"català"')
Much thanks for all of your kind help. It was really useful and solved that error . Also, I was busy with university, sorry for the late answer.
I'm getting a new error but this time it's more related to game menus. I'm currently trying to fix it. The default language is now "english" but previously it was "català". These are the three languages and their respective menus:
The problem is that with the last language "català", a different menu is launched. Instead of being the one I wrote above it's something like:
Start game
Load Game
Preferences
Help
Quit .
Also the help option only appears in this language.
I think this is because there are some default settings which I need to turn off. Currently trying to figure the script where they are located...
Nayru wrote:The problem is that with the last language "català", a different menu is launched. Instead of being the one I wrote above it's something like:
Start game
Load Game
Preferences
Help
Quit .
Based on your code, this is what would happen if 'lang' isn't one of the three supported languages.
One thing that could be happening is that 'lang' uses the decomposed form of the character 'à' but you're comparing it to the precomposed form (or vice-versa). See Unicode equivalence. The easiest way to prevent this is to simply use the English names for the languages, i.e. "catalan" instead of "català". (There is a proper way to prevent this, but it's fairly complicated and error-prone. I wouldn't recommend it.)