This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hey, is there any way to do a simple type parameter reference in my function?
i'd like to do this:
somewhere in the map i'll place global variable called TEXT with string type and somewhere i wanna pass this variable to function:
void changeTEXT (string& t) {
t += 1;
}
and do
changeTEXT (gv_tEXT); so it will change my global variable
i know i can do this with array and functions (using arrayref or funcref), but what about simple types like int or string?
(and looks like GUI parameter option 'use reference" does nothing)
as i found at http://www.sc2mapster.com/assets/galaxy-editor-beier/ i need Reference parameters, but i wasnt able to launch editor and watch how he handles "ref" statement in function parameters
The asset you linked is a language extention, which supports pointers (by simulating them using the data table). In vanilla galaxy, this is not possible to my knowledge, you are stuck with arrayref and funcref.
@Kueken531: Go
thanks, i was afraid all these features are just data table simulations =(
you could use an arrayref<> of an array of size1
Hey, is there any way to do a simple type parameter reference in my function?
i'd like to do this:
somewhere in the map i'll place global variable called TEXT with string type and somewhere i wanna pass this variable to function:
void changeTEXT (string& t) {
t += 1;
}
and do
changeTEXT (gv_tEXT); so it will change my global variable
i know i can do this with array and functions (using arrayref or funcref), but what about simple types like int or string?
(and looks like GUI parameter option 'use reference" does nothing)
as i found at http://www.sc2mapster.com/assets/galaxy-editor-beier/ i need Reference parameters, but i wasnt able to launch editor and watch how he handles "ref" statement in function parameters
The asset you linked is a language extention, which supports pointers (by simulating them using the data table). In vanilla galaxy, this is not possible to my knowledge, you are stuck with arrayref and funcref.
@Kueken531: Go
thanks, i was afraid all these features are just data table simulations =(
you could use an arrayref<> of an array of size1