Awesome, thanks for the quick update!
Speaking of update, it seems the editor crashes all the time once I've auto updated which makes me have to reinstall the editor. I'll send you a crash report on the next update
Awesome, thanks for the quick update!
Speaking of update, it seems the editor crashes all the time once I've auto updated which makes me have to reinstall the editor. I'll send you a crash report on the next update
Okay. The update feature appears to be working at my end.
Could you try relaunching the editor when it crashes?
Also, does the Update folder exists? If so, are there any files in it? If the Updater.exe file is there, is it still running?
Could you try checking that at next update if it still crashes?
I'm gonna assume that all your source files are in folders. A fix for you until the next version should be to just create an empty script file outside of any folders.
Edit:
I uploaded a new version. v2.3.7
I just uploaded another version. v2.4.0
I did it so that I could make a generic list. In case anyone else could use that,
http://www.sc2mapster.com/paste/3665/
Awesome! That'll come to use!
Edit: would it be possible to make it possible to compile via a command line? That way it could work cross-platform aswell as making it possible to use any editor of choice. I would also probably contribute with a plugin for some other editor if this was implemented.
Uploaded a new version. v 2.4.2
Soo, currently I am a little into galaxy scripting again, and I have some questions:
I am used to Jass/ZinC structs mainly, which would be used like this:
Struct Foo(){ int b; int a; int r; static thistype create(){ //thistype equals Foo thistype this=allocate(); //allocates the new struct instance this.b=5 .a=3 r=1 //all 3 ways to set members are valid return this; //constructor needs to return the struct instance } }
How would this translate to G++?
If you use a struct containing only methods and static members, your output script will not create a struct at all, but declaring an instance of the struct is still valid syntax for your input file and will be transferred in the output file, which causes a syntax error, because the struct doesn't exist in the output file.
Are static methods possible? If I try it, I get an "expect constant or identifier" message.
To make that struct valid galaxy++
//Not capital Struct, and no () in the struct declaration struct Foo { int b; int a; int r; //No static constructors - it wouldn't really make sense //Constructors are like methods, but have no return type, and the same name as the enclosing struct Foo() { //thistype this=allocate(); //The struct will be allowcated when you call #new Foo(). Then the constructor will automatically be called #this->b=5;//#this - not this, and -> instead of . since #this is a pointer to the newly created object #this->a=3;//You were missing #this - really, .a is not valid #this->r=1;//Yeah, r=1 should probably be valid, but at the moment, it isn't //And you forgot a bunch of ; in those 3 lines. //return this;//Constructors don't return an instance - they are called after a new instance has been created by #new } }
At the moment you can't make static methods.
My example was not meant to be "real" code, it was just an example, how the struct would roughly look in ZinC. Thanks for your help.
So, I would get a new instance by calling:
Foo* bar = #new Foo(); (or just #new Foo();)
How would I destroy it?
You would call
#delete bar;
In case you didn't know, there is a full documentation here
http://www.sc2mapster.com/assets/galaxy-editor-beier/#w-pointers
Ah, the new and delete statements are explained in the pointers section. I tried to find them in the struct section.
A suggestion: Would it be possible to include the Galaxy++ code in the map? Maybe as custom script or comment files, in the same folder structure you used in the G++ editor? This way, you have all your script in the map, and maybe you could add functionality to extract this script from the map to your editor; this way the additional script files would become obsolete.
Its not desperately needed, though, but it might be very convenient. You could make this optional as well.
Quote from Kueken531:
Ah, the new and delete statements are explained in the pointers section. I tried to find them in the struct section.
A suggestion: Would it be possible to include the Galaxy++ code in the map? Maybe as custom script or comment files, in the same folder structure you used in the G++ editor? This way, you have all your script in the map, and maybe you could add functionality to extract this script from the map to your editor; this way the additional script files would become obsolete.
Its not desperately needed, though, but it might be very convenient. You could make this optional as well.
----
Like uncompiled? Because when you compile and run it should be compiled and in the output map?
I think he means uncompiled - to keep all the map data in one file. It would require some restructuring, but it's of course not impossible
Edit:
Although, my compiler will not be able to save if the map is open in the normal editor.
Edit2:
I uploaded version 2.4.5
++ files inside the map (look in project properties).
Edit3:
A word of advice, make backups if you want to use the script to map feature. Were it not for my automatic backups, I would have lost my map script, because I told the editor to extract the script from the wrong map.
Edit4:
Fixed some bugs. v 2.4.6
Quote:
- Added an option to save the galaxy++ files inside the map (look in project properties).
And there I thought, this might be too complicated and probably nothing you would care about too much. Piece of cake, huh?
Gonna test this as soon as I get home.
€ how you write out your ++ without any visual indicator? I usually make one of the + bold ;) (or use plain text markup, but thats not what you did. Another markup?)
€€ ah, me blind
Well, I kindda cheated a bit, but from your point of view, it works as it should.
I use the escape markup syntax.. {{{++}}}
http://www.sc2mapster.com/wiki/knowledge-base/markup-types/
Edit:
I am a bit conflicted about the # in front of all the keywords, and would like to hear your opinions on them.. Should they stay or go?
I kindda think that the code would look nicer without them, but of course, removing them would mean that galaxy code using the keywords as names would be invalid.. What do you guys think?
Edit2:
I found an error in my previous implementation of a generic list. In case any of you are using the list, I uploaded a fixed version.
http://www.sc2mapster.com/paste/3681/
I uploaded a new version. v2.5.0
No, not at the moment
-------------------------------
No one really care whether or not the # are removed?
SBeier AuthorDid you add a message to the report? If so, I would very much like to have the code.
I would never include the user's code in the error reports without asking him. All I get is the message you type, and the location in my code where the error occurred.
Edit: Uploaded a new version. v2.3.5