YYC Compile Error

Evanski

Raccoon Lord
Forum Staff
Moderator
When I compile my game using the YYC setting I keep getting this error

GML:
1 error generated.
Z:/The_Faults_D22D5080_8DC1290F/The Faults in our Code/Default/Scripts/llvm-win/The_Faults_in_our_Code.vars.cpp:828:7: error: redefinition of 'g_Script_gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10'
YYVAR g_Script_gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10 = { "gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10", 100027 };
      ^
Z:/The_Faults_D22D5080_8DC1290F/The Faults in our Code/Default/Scripts/llvm-win/The_Faults_in_our_Code.vars.cpp:827:7: note: previous definition is here
YYVAR g_Script_gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10 = { "gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10", 100026 };
      ^
Could someone explain to me what the error is as I dont understand what the Redefinition means.

I know it has something to do with User_event0 of my debug object
 
Last edited:

TailBit

Member
I tried to google "error: redefinition of", and it seems to mean that it is trying to define something that have already been defined, like 2 functions with same name..

(it could mean a few other things too, but that one was the most likely one for GM)
 
Are you accidentally defining the same function twice? Now that scripts are decoupled from functions you could very easily accidentally name the same function twice. Perhaps a compatibility-related error? Double-check lines 828 and 827 of "DEBUG_MENU" in Other. It would also help to be able to see these lines - contrarily, it seems strange that the duplicate names are next to each other.
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Are you accidentally defining the same function twice? Now that scripts are decoupled from functions you could very easily accidentally name the same function twice. Perhaps a compatibility-related error? Double-check lines 828 and 827 of "DEBUG_MENU" in Other. It would also help to be able to see these lines - contrarily, it seems strange that the duplicate names are next to each other.
line 828 is a comment and line 827 is a space
 

curato

Member
YYC is a lot pickier on syntax. Double check you not doing anything silly like using = when you mean == or forgot to put a ; on the end of the line or something. also pay special attention to the first actual line of code before the error. I have seen compilers when they are expecting a semi colon or something and not get it that they sometimes don't freak out until they get to a line an the semi colon isn't actually there.
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Are you accidentally defining the same function twice? Now that scripts are decoupled from functions you could very easily accidentally name the same function twice. Perhaps a compatibility-related error? Double-check lines 828 and 827 of "DEBUG_MENU" in Other. It would also help to be able to see these lines - contrarily, it seems strange that the duplicate names are next to each other.
YYC is a lot pickier on syntax. Double check you not doing anything silly like using = when you mean == or forgot to put a ; on the end of the line or something. also pay special attention to the first actual line of code before the error. I have seen compilers when they are expecting a semi colon or something and not get it that they sometimes don't freak out until they get to a line an the semi colon isn't actually there.
I think its an issue with something I've coded in the User_Event0 block as I commented out all the code and the compiler had no other issues, There was another issue with the compiler not understanding something I did
GML:
(ord(vk_backspace))
I see now why this was an issue, I blame late nights and coffee, this was fixed by changing it to the actual UTF-8 code

So 10/10 Im betting the issue is something I've coded that the compiler isnt agreeing with
 

Evanski

Raccoon Lord
Forum Staff
Moderator
I think its an issue with something I've coded in the User_Event0 block as I commented out all the code and the compiler had no other issues, There was another issue with the compiler not understanding something I did
GML:
(ord(vk_backspace))
I see now why this was an issue, I blame late nights and coffee, this was fixed by changing it to the actual UTF-8 code

So 10/10 Im betting the issue is something I've coded that the compiler isnt agreeing with
Hey past me, you're an idiot, how did you fix this as the error is back and why didn't you say exactly what you did?

Code:
Z:/EvansDebug_E5100D21_41137310/EvansDebugConsole/Default/Scripts/llvm-win/gml_Object_obj_DEBUG_MENU_Other_10.gml.cpp:879:11: error: redefinition of 'gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10'
YYRValue& gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10( CInstance* pSelf, CInstance* pOther, YYRValue& _result, int _count,  YYRValue** _args  )
          ^
Z:/EvansDebug_E5100D21_41137310/EvansDebugConsole/Default/Scripts/llvm-win/gml_Object_obj_DEBUG_MENU_Other_10.gml.cpp:863:11: note: previous definition is here
YYRValue& gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10( CInstance* pSelf, CInstance* pOther, YYRValue& _result, int _count,  YYRValue** _args  )
          ^
Z:/EvansDebug_E5100D21_41137310/EvansDebugConsole/Default/Scripts/llvm-win/EvansDebugConsole.vars.cpp:429:7: error: redefinition of 'g_Script_gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10'
YYVAR g_Script_gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10 = { "gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10", 100012 };
      ^
Z:/EvansDebug_E5100D21_41137310/EvansDebugConsole/Default/Scripts/llvm-win/EvansDebugConsole.vars.cpp:428:7: note: previous definition is here
YYVAR g_Script_gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10 = { "gml_Script_ex_gml_Object_obj_DEBUG_MENU_Other_10", 100011 };
 
Last edited:
Top