Home   Help Search Login Register  

Author Topic: Foreach thislist doesnt work?  (Read 1706 times)

0 Members and 1 Guest are viewing this topic.

Offline 456820

  • Contributing Member
  • **
Foreach thislist doesnt work?
« 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

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Foreach thislist doesnt work?
« Reply #1 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..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline 456820

  • Contributing Member
  • **
Re: Foreach thislist doesnt work?
« Reply #2 on: 12 Apr 2007, 11:27:15 »
Thank you very much. Works.

#Topic solved.