Pages: 1
Author Topic: error: ‘asteroidParent’ was not declared in this scope  (47,187 Views)
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Posted on: July 25, 2014, 08: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
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #1 Posted on: July 26, 2014, 02:54:55 AM
Going to need more context here. Where is asteroidParent being used that it isn't declared?
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #2 Posted on: July 26, 2014, 03:03:19 AM
Quote from: Josh @ Dreamland on July 26, 2014, 02:54:55 AM
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.
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #3 Posted on: July 26, 2014, 01:33:13 PM
Here's the full error output:



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
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #4 Posted on: July 26, 2014, 03:11:03 PM
Okay, that's strange. Could you separate [snip]var iID =[/snip] to [snip]var iID; iID =[/snip] and see if that fixes it? The current parser seems to only check the first parameter of functions for variables.
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #5 Posted on: July 26, 2014, 06:56:54 PM
Quote from: Josh @ Dreamland on July 26, 2014, 03:11:03 PM
Okay, that's strange. Could you separate [snip]var iID =[/snip] to [snip]var iID; iID =[/snip] 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)
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #6 Posted on: July 29, 2014, 10: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  :(



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?  :-\
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #7 Posted on: July 30, 2014, 01:18:36 AM
Okay, the parser's being pretty stupid. But you left the original [snip]var iID =[/snip] in there; all you did was add another declaration above it. Remove var from that second line entirely.
Offline (Unknown gender) edsquare

Member
Joined: Apr 2014
Posts: 402
View profile
Reply #8 Posted on: July 30, 2014, 01:22:55 AM
Quote from: Josh @ Dreamland on July 30, 2014, 01:18:36 AM
Okay, the parser's being pretty stupid. But you left the original [snip]var iID =[/snip] 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!
Offline (Unknown gender) Darkstar2

Member
Joined: Jan 2014
Posts: 1,238
View profile
Reply #9 Posted on: July 30, 2014, 03:31:17 AM
Quote from: edsquare on July 30, 2014, 01:22:55 AM

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
Pages: 1