Defined twice error

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.
Post Reply
Message
Author
damianklu
Newbie
Posts: 4
Joined: Mon Oct 06, 2014 10:11 am
Contact:

Defined twice error

#1 Post by damianklu »

Hello, I want to translate visual novel game "To Kill A Black Swan" and when I already converted ".rpyc" file to ".rpy" then I get this error.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While loading the script.
ScriptError: Name u'audreyask' is defined twice: at game/script.rpy:745 and game/script.rpy:846.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "C:\Users\Dell\Desktop\To Kill A Black Swan\renpy\bootstrap.py", line 285, in bootstrap
    renpy.main.main()
  File "C:\Users\Dell\Desktop\To Kill A Black Swan\renpy\main.py", line 248, in main
    renpy.game.script.load_script() # sets renpy.game.script.
  File "C:\Users\Dell\Desktop\To Kill A Black Swan\renpy\script.py", line 177, in load_script
    self.load_appropriate_file(".rpyc", ".rpy", dir, fn, initcode)
  File "C:\Users\Dell\Desktop\To Kill A Black Swan\renpy\script.py", line 447, in load_appropriate_file
    if not self.load_file(dir, fn + compiled, initcode):
  File "C:\Users\Dell\Desktop\To Kill A Black Swan\renpy\script.py", line 320, in load_file
    self.finish_load(stmts, initcode)
  File "C:\Users\Dell\Desktop\To Kill A Black Swan\renpy\script.py", line 392, in finish_load
    node.filename, node.linenumber))
ScriptError: Name u'audreyask' is defined twice: at game/script.rpy:745 and game/script.rpy:846.

Windows-7-6.1.7601-SP1
Ren'Py 6.17.7.521
Even If I delete created ".rpy" files, error still appears. I already made one translation and somehow I solved this kind of problem, but now I don't know how to fix it. I want to make translation work only with putting translated ".rpy" files to "game" folder, without deleting anything. Can someone help me? Thanks!

And hey! It's my first post here, so hello everyone! :D

User avatar
Kaen
Regular
Posts: 148
Joined: Tue Oct 16, 2012 10:49 pm
Contact:

Re: Defined twice error

#2 Post by Kaen »

Hello :)

In the script.rpy file check the lines 745 and 846. They should have something there to fix.

damianklu
Newbie
Posts: 4
Joined: Mon Oct 06, 2014 10:11 am
Contact:

Re: Defined twice error

#3 Post by damianklu »

In the 745 and 846 line only is "label audreyask:", nothing else.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Defined twice error

#4 Post by Alex »

That's it - you have two labels named 'audreyask', but all labels must have unique names.

damianklu
Newbie
Posts: 4
Joined: Mon Oct 06, 2014 10:11 am
Contact:

Re: Defined twice error

#5 Post by damianklu »

So how to fix it? Sorry, but I don't know much about Ren'Py. I didn't change anything in ".rpy" files except dialogues, these two same labels already was there.

User avatar
NoJoker
Regular
Posts: 145
Joined: Sun Sep 11, 2011 5:52 pm
Completed: Sleepless Night series, Soulmates, TIWIWTD, TKABS
Projects: Legend of the Silver Fox, Sleepless Night 3
Deviantart: Massimow
itch: massimow
Location: Germany
Discord: Massimo#3596
Contact:

Re: Defined twice error

#6 Post by NoJoker »

Hi, this is the developer.
You should have contacted me before you start encrypting the game and translating it all on your own. I'm very keen on having my games translated in as much languages as possible. I can send you translation files where you just put your translation in without having to deal with the rpy files. That way I can even include the translation officially in the game and credit you.
Image

damianklu
Newbie
Posts: 4
Joined: Mon Oct 06, 2014 10:11 am
Contact:

Re: Defined twice error

#7 Post by damianklu »

NoJoker wrote:Hi, this is the developer.
You should have contacted me before you start encrypting the game and translating it all on your own. I'm very keen on having my games translated in as much languages as possible. I can send you translation files where you just put your translation in without having to deal with the rpy files. That way I can even include the translation officially in the game and credit you.
Of course, send me translation files, thanks! And sorry for not contacting you before.

Post Reply

Who is online

Users browsing this forum: Ocelot