ENIGMA Forums

Outsourcing saves money => Programming Help => Topic started by: edsquare on July 25, 2014, 03:22:49 PM

Title: error: ‘asteroidParent’ was not declared in this scope
Post by: edsquare on July 25, 2014, 03:22:49 PM
What can I do? Been searching but can't seem to find how to do it, a similar game developed in GayMaker doesn't have the objects parents declared and it's supossed to be a tutorial  ???

Any help welcome, even if it's just to point me to where I should've seen the solution and didn't because I'm that dumb sometimes...  :D
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: Josh @ Dreamland on July 25, 2014, 09:54:55 PM
Going to need more context here. Where is asteroidParent being used that it isn't declared?
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: edsquare on July 25, 2014, 10:03:19 PM
Going to need more context here. Where is asteroidParent being used that it isn't declared?

It's a GM tutorial for gml, thanks for the interest, tomorrow will upload the code, too tired and have to get up early.
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: edsquare on July 26, 2014, 08:33:13 AM
Here's the full error output:

Code: [Select]

make[1]: se ingresa al directorio «/home/eduardo/enigma/ENIGMAsystem/SHELL»
g++ -Wall -s -O3 -fno-rtti -fno-exceptions -DPATH_EXT_SET -IPlatforms/xlib/Info -IGraphics_Systems/OpenGL1/Info -IAudio_Systems/OpenAL/Info -ICollision_Systems/Precise/Info -IWidget_Systems/None/Info -INetworking_Systems/None/Info -IUniversal_System/Info -I. -I/home/eduardo/.enigma/ -Wall -s -O3 -fno-exceptions  -MMD -MP -c -o /home/eduardo/.enigma/.eobjs/Linux/Linux/Run/SHELLmain.o SHELLmain.cpp
In file included from SHELLmain.cpp:106:0:
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function ‘variant _SCR_master_bullet(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)’:
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:235:67: error: ‘y’ was not declared in this scope
         var iID = instance_place(enigma::glaccess(int(self))-> x, y, asteroidParent);
                                                                   ^
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:235:70: error: ‘asteroidParent’ was not declared in this scope
         var iID = instance_place(enigma::glaccess(int(self))-> x, y, asteroidParent);
                                                                      ^
make[1]: *** [/home/eduardo/.enigma/.eobjs/Linux/Linux/Run/SHELLmain.o] Error 1
make[1]: se sale del directorio «/home/eduardo/enigma/ENIGMAsystem/SHELL»
make: *** [Game] Error 2


The gmx enigma report's it as corrupted and that it managed to extract only part of it, could that be the source of the problem?

Here's the egm I'm workin in:

http://www51.zippyshare.com/v/32245687/file.html

Why is it, that, if an attached file is too big; the forum erases my whole post instead of just reporting the issue and not attaching it?  ???

Thanks again in advance  :D
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: Josh @ Dreamland on July 26, 2014, 10:11:03 AM
Okay, that's strange. Could you separate var iID = to var iID; iID = and see if that fixes it? The current parser seems to only check the first parameter of functions for variables.
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: edsquare on July 26, 2014, 01:56:54 PM
Okay, that's strange. Could you separate var iID = to var iID; iID = and see if that fixes it? The current parser seems to only check the first parameter of functions for variables.

Will do and keep you posted, thanks!  (Y)
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: edsquare on July 29, 2014, 05:00:02 PM
I'm back!

Okey as advised I upgraded to the latest LGM/ENIGMA, made the changes Josh suggested but still no luck  :(

Code: [Select]

make[1]: se ingresa al directorio «/home/eduardo/enigma/ENIGMAsystem/SHELL»
g++ -Wall -s -O3 -fno-rtti -fno-exceptions -DPATH_EXT_SET -IPlatforms/xlib/Info -IGraphics_Systems/OpenGL1/Info -IAudio_Systems/OpenAL/Info -ICollision_Systems/Precise/Info -IWidget_Systems/None/Info -INetworking_Systems/None/Info -IUniversal_System/Info -I. -I/home/eduardo/.enigma/ -Wall -s -O3 -fno-exceptions  -MMD -MP -c -o /home/eduardo/.enigma/.eobjs/Linux/Linux/Run/SHELLmain.o SHELLmain.cpp
In file included from SHELLmain.cpp:106:0:
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In function ‘variant _SCR_master_bullet(variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant, variant)’:
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:236:13: error: redeclaration of ‘var iID’
         var iID = instance_place(enigma::glaccess(int(self))-> x, y, asteroidParent);
             ^
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:235:13: error: ‘var iID’ previously declared here
         var iID;
             ^
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:236:67: error: ‘y’ was not declared in this scope
         var iID = instance_place(enigma::glaccess(int(self))-> x, y, asteroidParent);
                                                                   ^
/home/eduardo/.enigma/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:236:70: error: ‘asteroidParent’ was not declared in this scope
         var iID = instance_place(enigma::glaccess(int(self))-> x, y, asteroidParent);
                                                                      ^
make[1]: *** [/home/eduardo/.enigma/.eobjs/Linux/Linux/Run/SHELLmain.o] Error 1
make[1]: se sale del directorio «/home/eduardo/enigma/ENIGMAsystem/SHELL»
make: *** [Game] Error 2


What am I doing wrong?  :-\
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: Josh @ Dreamland on July 29, 2014, 08:18:36 PM
Okay, the parser's being pretty stupid. But you left the original var iID = in there; all you did was add another declaration above it. Remove var from that second line entirely.
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: edsquare on July 29, 2014, 08:22:55 PM
Okay, the parser's being pretty stupid. But you left the original var iID = in there; all you did was add another declaration above it. Remove var from that second line entirely.

Fuck!  >:(  You're right! :o  What a moron! :-\ How could I make such a stupid mistake?  ???

Fixing it right away.  (Y)

EDIT: Fixed it, it worked, thanks a lot Josh!
Title: Re: error: ‘asteroidParent’ was not declared in this scope
Post by: Darkstar2 on July 29, 2014, 10:31:17 PM

Fuck!  >:(  You're right! :o  What a moron! :-\ How could I make such a stupid mistake?  ???

lol - don't worry, you didn't break any records yet....Some have done far worse. :P