hey guys, here I am again...
I'll keep it short...
onMapSingleClick won't for the life of me pass an argument of my own...
I make two tiny scripts: test1.sqs and test2.sqs
I launch test1.sqs from wherever, no arguments like this:
[] exec "test1.sqs"
test1.sqs looks like this:
_myargu = "this is a test"
onMapSingleClick {[_pos, _units, _shift, _alt, _myargu] exec "test2.sqs"}
exit
test2.sqs is then launched when you alt+click on map
if !(_this select 3) then {exit}
_myargu = _this select 4
player groupchat format ["myargu: %1", _myargu]
exit
what this ought to do is you alt+click on map and player will write in group chat: "this is a test"
but...
instead player writes: "myargu: scalar bool array string 0xfcffffef"
so obviously the argument isn't getting passed properly...
if I execute test2.sqs without onMapSingleClick eg [0,0,0,true,_myargu] exec "test2.sqs" it displays the text just like it should...
when I search on this forum I see plenty of examples that passes their own expressions through it and I can only assume that they have it working fine, right?
so what's up?
I've tried several variable names and removing all but one argument etc etc, but either this is a bug or I'm missing something completely obvious.
please help me