OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: pangzi on 17 Jan 2003, 12:38:01
-
Is there a way to create an array consisting of markers??
i tried
A)
WpArrayinf_1 = []
WPArrayinf_1 = WpArrayInf_1 + "inf_1Wp1"
the game complains "generic error in expression"
B)
WpArrayinf_1 = []
WPArrayinf_1 = WpArrayInf_1 + inf_1Wp1
the game doesn't complain, but i cannot read out the array later on ( probably because it recards inf_1Wp1 as an object)
Any answer would be very much appreciated
Thanx for reading :)
-
You can add 2 arrays : [0, 1, 2] + [1, 2, 3] , result is [0, 1, 2, 1, 2, 3]
But you can't add a variable to an array : [0, 1, 2] + MyVar = an Error
So
WPArrayinf_1 = WpArrayInf_1 + ["inf_1Wp1"]
-
thanks! ;D
I just forgot the brackets (["..."]). works fine now.
So if you want to add a single element to an array it has to be declared as a one dimensional array. Doesn't make much sense to me ???