Home
Intel Depot
Editors Depot
Missions Depot
Addons Depot
Forum
Home
Help
Search
Login
Register
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
add "marker" to array
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: add "marker" to array (Read 559 times)
0 Members and 1 Guest are viewing this topic.
pangzi
Guest
add "marker" to array
«
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
Logged
uiox
Contributing Member
Re:add "marker" to array
«
Reply #1 on:
17 Jan 2003, 13:50:35 »
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"]
Logged
pangzi
Guest
Re:add "marker" to array
«
Reply #2 on:
18 Jan 2003, 11:39:05 »
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
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
OFPEC Forum
»
Editors Depot - Mission Editing and Scripting
»
OFP - Editing/Scripting General
(Moderators:
h-
,
savedbygrace
,
Gruntage
) »
add "marker" to array
Top of page