Hi:
Another Noob question
I understand that I pass variables to my scipts using the call in the on activation box of a trigger
I understand that the call should be in the format:
[var1,var2,var3,...] exec "scriptname.sqs"
I'm just having a little trouble figuring out how to assign those values to variables within the script. I this it's done like this
scriptvar1 = this select 0 ; for var1
scriptvar2 = this select 1 ; for var 2
I understand that I can make the variable global or local by using the _ before the name.
I'm having some trouble with variable types.
The script:
;THis script tells a unit to go to one of four compass points when given a radio command
;the call for this script should read "[unit,wpname] exec wp.sys
;these two lines seed data from the call statement into the variables that the script uses
_unit=_this select 0
_wpname=_this select 1
_unit commandmove getmarkerpos _wpname
#end
Which I was using to try and move a unit to a gamelogic field called wpn keeps returning the error:
'unit commandmove getmarkerpos _wpname |#|':Error getmarkerpos: type Object,expected string
help