Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Goombert

256
General ENIGMA / Re: Joshedit
« on: May 20, 2016, 05:58:44 PM »
I just want to say, that I take full responsibility for this happening and I'm sorry I did not fix this when it first occurred. Rusky has now corrected the submodule for JoshEdit.

https://github.com/IsmAvatar/LateralGM/pull/294
https://github.com/IsmAvatar/LateralGM/pull/293

It should now be possible to clone and setup LateralGM in just two calls.
Code: [Select]
git clone https://github.com/IsmAvatar/LateralGM.git
cd lateralgm
git submodule update --init

LGM no longer has any code that JoshEdit does not, and this will prevent the two from ever getting unsynced again. Any changes to JoshEdit should be sent to the JoshEdit master branch, and then simply update the submodule and rebuild a new jar of LGM.

As far as piping exceptions from JoshEdit again, I decided to go ahead and file a feature request for that on its repo.
https://github.com/JoshDreamland/JoshEdit/issues/58

257
Issues Help Desk / Re: Crash on Ubuntu-like OS.
« on: May 20, 2016, 05:25:15 PM »
Where you checked out enigma-dev, does the file compileEGMf.so actually exist in there? Somebody else had this problem a week or two ago and I remember Josh fixing it somehow.

258
Issues Help Desk / Re: Crash on Ubuntu-like OS.
« on: May 19, 2016, 02:10:37 PM »
No, CD into enigma-dev/CompilerSource and run make please. compileEGMf is the enigma.jar/plugin's interface to the compiler. It just wraps the methods in the compiler in an interface that JNA can export to Java so the plugin can call make() when you hit the run button for example. I want to see you run make in that folder.

259
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 02:06:50 PM »
After that I went and tested this code again in the create event... and it worked. So it's actually a JDI bug with script locals causing the dot operator to not work. You should not call new, and instead use the following code in events only.

Code: (EDL) [Select]
intStats test;
test.amount = 539;
show_message(string(test.amount));

260
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 01:50:31 PM »
Oh I think I know what the problem is thanks to Rusky. I do not think we turned on C++11 for Linux yet. Try using this rewritten struct, c++98 does not support default values like that.

Code: (EDL) [Select]
struct itemStats {
  string itemID;
  int amount;

  itemStats() : itemID(""), amount(1) { }
};

261
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 01:43:02 PM »
Shoot, I'm about out of ideas until Josh gets here to ask. He should be here later tonight.

What is the output of gcc -v in a terminal?

262
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 01:06:41 PM »
Try using -> instead of the . operator. Definitely do not try using a different compiler, we want GCC to work, GCC is the defacto. For now anyway.

263
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 12:49:55 PM »
Ahhhh, I bet I know why, are you on Linux? (I see your penguin). If so, then you are probably using GCC which is a little different than the MinGW I am using on Windows.

You could try making the cast explicit:
Code: (EDL) [Select]
test.amount = (int)539;
Or just change amount from int to var in the struct.

264
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 12:17:37 PM »
That's weird, I used it in the create event, give me a minute and I'll test.

Edit: Just tested my code from above in a script and called it from create, worked fine. So let me test the struct you are using.

Edit 2: Nope, I just tested again, it worked fine for me.

Definitions
Code: (EDL) [Select]
struct itemStats {
        string itemID = "";
        int amount = 1;
};

scr_0
Code: (EDL) [Select]
itemStats *test = new itemStats();

test.amount = 539;

show_message(string(test.amount));

Create event:
Code: (EDL) [Select]
scr_0();

265
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 11:40:05 AM »
No, you need the star, it's a C++ pointer.

Code: (EDL) [Select]
itemStats *stats = new itemStats();
You probably do need to delete them as well, but that would maybe be better answered by Josh. I would go ahead and delete them anyway.

266
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 10:55:48 AM »
I just tested myself again, and it does want the semicolon in Definitions. I think we planned/plan to make the semicolon optional but never got around to it. Basically, our GML->C++ compiler is not run over Definitions right yet, so Definitions is just pure C++.

This I got to actually compile:
Code: (C) [Select]
struct circle {
  var x = 0, y = 0;
  double radius;
  double get_area() { return pi * radius * radius; } // Simple method
  circle(double r = 1) { radius = r; }; // Optimizing this falls on the language plugin
  ~circle() { }
};

Code: (EDL) [Select]
circle *test = new circle();

test.x = 539;

show_message(string(test.x));

I'm surprised that new is required otherwise the dot operator does not work. That would be a question to ask Josh, but at least for now using structs like that works.

267
Issues Help Desk / Re: Crash on Ubuntu-like OS.
« on: May 19, 2016, 09:49:53 AM »

268
Third Party / Re: Game Maker IDE
« on: May 19, 2016, 07:09:09 AM »
I seen this a while ago and I really like what you've got so far. I really like the dark theme the best though, the second Windows 95 theme looks a little too dated. May I ask what you are using for the UI?

Your embedding of the code editor in the object frame was something we considered before:
http://enigma-dev.org/forums/index.php?topic=910

Your choice of JSON is a good one too. If you need any help reading or writing the GMK formats, the LGM source code is publicly available on GitHub:
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/file/GmFileReader.java
We also have some documentation on the Wiki:
http://enigma-dev.org/docs/Wiki/GM_format

Nice work so far, keep it up! Having lots of choices is really good for GameMaker users.

269
Programming Help / Re: Using EDL in LateralGM
« on: May 19, 2016, 03:58:15 AM »
You are missing a semicolon and ENIGMA only allows structs in Definitions, please see the Wiki page.

http://enigma-dev.org/docs/Wiki/Structures

Quote from: ENIGMA Wiki
It is important to realize that structures and classes cannot be defined in EDL as with other code. They must be defined in Definitions, as with other C++ functions. Then they can be instantiated and used in your EDL code. In other words, the above example code could not be placed in, say, an object's Create event. It must go in Definitions.

You can find Definitions under Build->Settings->ENIGMA->General->Definitions Button

Though I did also try this myself and could not get it to work, it seems that the dot operator is broken.
Code: (EDL) [Select]
itemStats stats;
stats.amount = 66;
if (stats.amount == 66) {
        show_message(string("hello"));
}
Code: (EDL) [Select]
struct itemStats {
        string itemID = "";
        int amount = 1;
};
Quote from: Compile Output
error: invalid cast from type 'itemStats' to type 'int'
     if((enigma::varaccess_amount(int(stats))== 66))
                                           ^

270
Programming Help / Re: Help with gmk format
« on: May 12, 2016, 09:47:31 PM »
This paper might actually help you by IsmAvatar where she explains how the entire GM8 format works.
http://lateralgm.org/formats/gmformat8.txt

She was the one that started LGM many years ago.