Hoohee
 Joined: Aug 2017
Posts: 40
|
 |
Reply #30 Posted on: September 14, 2017, 12:48:54 AM |
|
|
So, I've been working on getting the revised code into my game, and I get the following compile error: QuoteCheck `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: 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?
|
|
|
hpg678
 Joined: Mar 2017
Posts: 283
|
 |
Reply #31 Posted on: September 14, 2017, 01:13:42 AM |
|
|
|
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; }
}
|
|
|
Goombert
 Joined: Jan 2013
Posts: 2,991
|
 |
Reply #32 Posted on: September 14, 2017, 07:00:23 PM |
|
|
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#L1189Judging 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. 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/54Not sure when it may be fixed, busy working on sumptin' TOP secret so you won't have to worry about this problem ever again.
|
|
|
time-killer-games Guest
|
 |
Reply #33 Posted on: September 14, 2017, 09:05:24 PM |
|
|
Quote from: Goombert on September 14, 2017, 07:00:23 PM 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. 
|
|
|
Hoohee
 Joined: Aug 2017
Posts: 40
|
 |
Reply #34 Posted on: September 15, 2017, 11:05:26 PM |
|
|
Quote from: Goombert on September 14, 2017, 07:00:23 PM 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.
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.
|
|
|
Hoohee
 Joined: Aug 2017
Posts: 40
|
 |
Reply #35 Posted on: September 18, 2017, 02:18:39 AM |
|
|
|
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.
|
|
|
|
|
Hoohee
 Joined: Aug 2017
Posts: 40
|
 |
Reply #37 Posted on: September 20, 2017, 09:13:49 PM |
|
|
Quote from: faissaloo on September 20, 2017, 11:56:56 AM
Quote from: Hoohee on September 18, 2017, 02:18:39 AM 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.
|
|
|
faissaloo
 Joined: Jan 2013
Posts: 87
|
 |
Reply #38 Posted on: September 21, 2017, 08:07:44 AM |
|
|
Quote from: Hoohee on September 20, 2017, 09:13:49 PM
Quote from: faissaloo on September 20, 2017, 11:56:56 AM
Quote from: Hoohee on September 18, 2017, 02:18:39 AM 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
|
|
|
Hoohee
 Joined: Aug 2017
Posts: 40
|
 |
Reply #39 Posted on: September 21, 2017, 08:47:57 PM |
|
|
|
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?
|
|
|
faissaloo
 Joined: Jan 2013
Posts: 87
|
 |
Reply #40 Posted on: September 22, 2017, 02:23:57 PM |
|
|
Quote from: Hoohee on September 21, 2017, 08:47:57 PM 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.
|
|
|
Hoohee
 Joined: Aug 2017
Posts: 40
|
 |
Reply #41 Posted on: September 22, 2017, 08:27:49 PM |
|
|
|
Oh, then I apologize. Issue remains, then.
|
|
|
|