OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: 456820 on 11 Apr 2007, 21:16:59

Title: Foreach thislist doesnt work?
Post by: 456820 on 11 Apr 2007, 21:16:59
I have a trigger which is set to OPFOR present.
Condition is simply

'this and obj1secure'

obj1secure is set to true so then the trigger will activate like it does.
But in the activation field i have

"_x removemagazine {30Rnd_545x39_AK}" foreach thislist

In ofp this removed an AK magazine from everyone in the trigger however in ArmA i get an error and wont let me use that trigger?
So how do i do this in ArmA?

Here is a picture of the error message....
http://img58.imageshack.us/img58/1554/errorjd0.jpg
Title: Re: Foreach thislist doesnt work?
Post by: h- on 11 Apr 2007, 21:36:32
The code in ArmA no longer accepts "" as it treats such things as strings.
You need to use {} instead..

In this case
Code: [Select]
{_x removemagazine "30Rnd_545x39_AK"} foreach thislistshould work..
Title: Re: Foreach thislist doesnt work?
Post by: 456820 on 12 Apr 2007, 11:27:15
Thank you very much. Works.

#Topic solved.