OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Grizzlie on 26 May 2005, 19:24:33
-
I was trying to find answer here but maybe my langue skills r too weak.
What i'm asking for.
Using name of variable in script call parses this variable value.
And i want to parse variable name for later use.
For instance
[a, [a1, var1],[a2,var2] ] exec "move.sqs"
where a is vehicle, a1 & a2 - points to move and var1 & var2 - variables determining if in point vehicle is to wait or no
Is it possible?
-
I think you mean passing a varaible, not parsing a variable.
[a, [a1, var1],[a2,var2] exec "move.sqs"
needs an extra ] as follows
[a, [a1, var1],[a2,var2] ] exec "move.sqs"
This is quite valid, but I would use a different name 'move' is an OFP command. It will still work it is just confusing.
in the script you would have
_veh = _this select 0
_point1 = _this select 1
_point2 = _this select 2
.
.
.
_veh will be a
_point1 will be the array [a1, var1]
and
_point2 will be the array [a2, var2]
-
It was only fictional example :)
But thanks for missing bracket - fixing
-
Thanks THobson for "hint" :)
Using "pass" for search helped. I still do not know how to pass name of variable, but i have found solution of my problem.