Pages: « 1 2 3
  Print  
Author Topic: Help! Make a Game Maker project compatible with Enigma.  (Read 21271 times)
Offline (Unknown gender) Hoohee
Reply #30 Posted on: September 13, 2017, 07:48:54 pm
Member
Joined: Aug 2017
Posts: 40

View Profile
So, I've been working on getting the revised code into my game, and I get the following compile error:
Quote
Check `object_Mouth::step...Syntax error in object `object_Mouth', Step event:0:
Line 15, position 17 (absolute 537): Expected closing parenthesis before closing brace

Which is bizarre, because looking at the code, it seems like I actually have it:
Code: [Select]
if(sprite_index==sprite_StellaSouthwest) {
                with(other){
                        x=object_Bee.x-15;
                        y=object_Bee.y+27;
                }

Any idea why this error is being triggered?
Logged
Offline (Male) hpg678
Reply #31 Posted on: September 13, 2017, 08:13:42 pm

Member
Location: Barbados
Joined: Mar 2017
Posts: 283

View Profile Email
looks like you forgot to write an extra } at the end of your statement

revised version:
 
if(sprite_index==sprite_StellaSouthwest) {//this is orphaned as it stands
                with(other){
                        x=object_Bee.x-15;
                        y=object_Bee.y+27;
                }

} <=this should be at the end....thus the error


the following should simplify matters a little bit

if(sprite_index==sprite_StellaSouthwest)
{
   

     with(other)
         {
           x=object_Bee.x-15;
           y=object_Bee.y+27;
         }

}
Logged
[compromised account]
Offline (Male) Goombert
Reply #32 Posted on: September 14, 2017, 02:00:23 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
This is definitely a bug, the question is what part.

So the way this works is the lgmplugin that plugs ENIGMA into LateralGM converts all your actions to GML code before sending it to ENIGMA. ENIGMA then converts the GML over to C++.
https://github.com/enigma-dev/lgmplugin/blob/master/org/enigma/EnigmaWriter.java#L1189

Judging by the output in C:\ProgramData\ENIGMA\Preprocessor_Environment_Editable\IDE_EDIT_objectfunctionality.h the bug appears to be in the plugin, because there should actually be a with(-1) meaning self around the action_move_to.

Code: (cpp) [Select]
variant enigma::OBJ_object_Arrow::myevent_step()
{
  { if (timeline_running && timeline_speed!=0) advance_curr_timeline(); }
with((0))
    if(action_if_variable(enigma::varaccess_Jump(int(self)), 1, 0))
  {
    argument_relative = 0;
    action_move_to(enigma::glaccess(int(object_Ball))-> x + 5, enigma::glaccess(int(object_Ball))-> y - 20);
   
  }
  with((0))
    if(action_if_variable(enigma::varaccess_Jump(int(self)), 0, 0))
  {
    argument_relative = 0;
    action_move_to(100, 100);
   
  }
  ;
 
  return 0;
}

This is a new issue that I am surprised wasn't reported before, either way I've filed a bug on the lgmplugin:
https://github.com/enigma-dev/lgmplugin/issues/54

Not sure when it may be fixed, busy working on sumptin' TOP secret so you won't have to worry about this problem ever again.
« Last Edit: September 14, 2017, 02:46:48 pm by Goombert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) time-killer-games
Reply #33 Posted on: September 14, 2017, 04:05:24 pm
"Guest"


Email
Not sure when it may be fixed, busy working on sumptin' TOP secret so you won't have to worry about this problem ever again.

Sounds like a YoYoGames squirrel on the loose. :D
Logged
Offline (Unknown gender) Hoohee
Reply #34 Posted on: September 15, 2017, 06:05:26 pm
Member
Joined: Aug 2017
Posts: 40

View Profile
This is definitely a bug, the question is what part.

So the way this works is the lgmplugin that plugs ENIGMA into LateralGM converts all your actions to GML code before sending it to ENIGMA. ENIGMA then converts the GML over to C++.
https://github.com/enigma-dev/lgmplugin/blob/master/org/enigma/EnigmaWriter.java#L1189

Judging by the output in C:\ProgramData\ENIGMA\Preprocessor_Environment_Editable\IDE_EDIT_objectfunctionality.h the bug appears to be in the plugin, because there should actually be a with(-1) meaning self around the action_move_to.

Code: (cpp) [Select]
variant enigma::OBJ_object_Arrow::myevent_step()
{
  { if (timeline_running && timeline_speed!=0) advance_curr_timeline(); }
with((0))
    if(action_if_variable(enigma::varaccess_Jump(int(self)), 1, 0))
  {
    argument_relative = 0;
    action_move_to(enigma::glaccess(int(object_Ball))-> x + 5, enigma::glaccess(int(object_Ball))-> y - 20);
   
  }
  with((0))
    if(action_if_variable(enigma::varaccess_Jump(int(self)), 0, 0))
  {
    argument_relative = 0;
    action_move_to(100, 100);
   
  }
  ;
 
  return 0;
}

This is a new issue that I am surprised wasn't reported before, either way I've filed a bug on the lgmplugin:
https://github.com/enigma-dev/lgmplugin/issues/54

Not sure when it may be fixed, busy working on sumptin' TOP secret so you won't have to worry about this problem ever again.

Thank you; that worked!  I also went a lot faster when I realized I could click on a close bracket and be shown where it opened.
Logged
Offline (Unknown gender) Hoohee
Reply #35 Posted on: September 17, 2017, 09:18:39 pm
Member
Joined: Aug 2017
Posts: 40

View Profile
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.
Logged
Offline (Male) faissaloo
Reply #36 Posted on: September 20, 2017, 06:56:56 am

Contributor
Location: Britbongistan
Joined: Jan 2013
Posts: 87

View Profile WWW Email
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.
Are you swapping any objects that depend on user input? You might need an io_clear() somewhere
Logged
Offline (Unknown gender) Hoohee
Reply #37 Posted on: September 20, 2017, 04:13:49 pm
Member
Joined: Aug 2017
Posts: 40

View Profile
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.
Are you swapping any objects that depend on user input? You might need an io_clear() somewhere

Possibly so, but what do you mean by "swapping"?  I'm not turning an instance into another instance, of that's what you meant.  There are two objects that utilize the one's offending variable, but to test out the bug, I deleted the other object, and it still happens.
Logged
Offline (Male) faissaloo
Reply #38 Posted on: September 21, 2017, 03:07:44 am

Contributor
Location: Britbongistan
Joined: Jan 2013
Posts: 87

View Profile WWW Email
I may have discovered another bug.  For some reason, turning on a user-defined variable (by holding a button) messes with a character's movement.  The character either stops moving, or moves in weird ways.  I haven't been able to duplicate this in my experiment file (the "Jump" one), but I'll keep trying to figure out what's wrong.  In the meantime, if this helps, the character's movement uses variables as well; the hspeed and vspeed variables in the "Step" event.
Are you swapping any objects that depend on user input? You might need an io_clear() somewhere

Possibly so, but what do you mean by "swapping"?  I'm not turning an instance into another instance, of that's what you meant.  There are two objects that utilize the one's offending variable, but to test out the bug, I deleted the other object, and it still happens.
I mean destroying an object and creating another one in its place, that's usually what I've been doing when stuff like this has happened to me
Logged
Offline (Unknown gender) Hoohee
Reply #39 Posted on: September 21, 2017, 03:47:57 pm
Member
Joined: Aug 2017
Posts: 40

View Profile
So that implies that you've seen such things before.  I'd rather not destroy and replace the object, since that opens up a bunch of other cans of worms, and the current object has too much complex code and things pointing to it not to cause errors from its destruction.  To do this would necessitate rewriting most of the code from scratch, and probably figuring out new ways to do things I had down fine.  None of that pausing happens in Game Maker, so a bug is a bug and a bug deserves research and repair.  Still, any insight into what causes this, and is there a way to fix it that doesn't involve destroying and replacing the player object?
Logged
Offline (Male) faissaloo
Reply #40 Posted on: September 22, 2017, 09:23:57 am

Contributor
Location: Britbongistan
Joined: Jan 2013
Posts: 87

View Profile WWW Email
So that implies that you've seen such things before.  I'd rather not destroy and replace the object, since that opens up a bunch of other cans of worms, and the current object has too much complex code and things pointing to it not to cause errors from its destruction.  To do this would necessitate rewriting most of the code from scratch, and probably figuring out new ways to do things I had down fine.  None of that pausing happens in Game Maker, so a bug is a bug and a bug deserves research and repair.  Still, any insight into what causes this, and is there a way to fix it that doesn't involve destroying and replacing the player object?
No, you misunderstood me, I'm saying that behavior usually happened when I did that, I wasn't suggesting destroying and creating the object as a solution.
Logged
Offline (Unknown gender) Hoohee
Reply #41 Posted on: September 22, 2017, 03:27:49 pm
Member
Joined: Aug 2017
Posts: 40

View Profile
Oh, then I apologize.  Issue remains, then.
Logged
Pages: « 1 2 3
  Print