So is galaxy language based on c++? So I cant go int i; int* a; a= &i; a++; Or, void Attack( Enemy** enemies )
Attack( Enemies ). Can I do stuff like this?
For an outline of galaxy script features, see Deaod's documentation of types, operators, and bitwise operators. For a standard galaxy library reference (PTR build 28272), see the attached archive file.
Galaxy script is neutered C; the galaxy environment is exceedingly focused on avoiding shit like Warcraft 3's return bug exploit enabling execution of arbitrary code from malicious maps. No surprise pointers were remove in WoL beta patch 9, while structref and arrayref cannot occupy the global scope, cannot be returned from functions, limiting them to parameters. In the absence of these restrictions, likely-exploitable consequences would follow; a reference to a local array/struct returning from a function could inadvertently expose memory addresses of the deallocated values for modification from within the galaxy environment. It's simply not a convenient language, and most certainly will never be convenient.
Also, one cannot typedef arrayref; one must instead typedef the array type and dimensions, and use arrayref in the parameter.
Are there anyway to use pointers or references in the editor? I know it can be avoided in most cases but they would help a lot.
@penguinwars: Go
Only possible if you are using Galaxy custom script. Example:
So is galaxy language based on c++? So I cant go int i; int* a; a= &i; a++; Or, void Attack( Enemy** enemies )
Attack( Enemies ). Can I do stuff like this?
Or classes would be really nice just to do stuff like this, I find there aren't enough actions and stuff to really do a lot of things.
Galaxy doesnt even have the feature set of C, so no, no classes, no pointers. :(
@penguinwars: Go
The only thing like what you are looking for are the "refs" I provided above. No classes or pointers.
For an outline of galaxy script features, see Deaod's documentation of types, operators, and bitwise operators. For a standard galaxy library reference (PTR build 28272), see the attached archive file.
Galaxy script is neutered C; the galaxy environment is exceedingly focused on avoiding shit like Warcraft 3's return bug exploit enabling execution of arbitrary code from malicious maps. No surprise pointers were remove in WoL beta patch 9, while structref and arrayref cannot occupy the global scope, cannot be returned from functions, limiting them to parameters. In the absence of these restrictions, likely-exploitable consequences would follow; a reference to a local array/struct returning from a function could inadvertently expose memory addresses of the deallocated values for modification from within the galaxy environment. It's simply not a convenient language, and most certainly will never be convenient.
Also, one cannot typedef arrayref; one must instead typedef the array type and dimensions, and use arrayref in the parameter.
Awe :(