Home   Help Search Login Register  

Author Topic: annoying foreach problem  (Read 1150 times)

0 Members and 1 Guest are viewing this topic.

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
annoying foreach problem
« on: 25 Jun 2003, 18:59:34 »
i want to have a single command which will remove the pipebombs from several groups of blackops.  this is the command i tried~

"_x removemagazines pipebomb" foreach (units group1 + units group2...etc)

only problem is that pipebomb has to be in quotes to work.  but if i have:

"_x removemagazines "pipebomb"" foreach (units group1 + units group2...etc)

then it will think the command is "_x removemagazines "



what do i do??

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:annoying foreach problem
« Reply #1 on: 25 Jun 2003, 19:31:06 »
u need 2 put da pipebomb between double "" or use {} (second way only if u have 1.75 +)

so da line shud b

Code: [Select]
"_x removemagazines ""pipebomb""" foreach (units group1 + units group2...etc)
or

Code: [Select]
"_x removemagazines {pipebomb}" foreach (units group1 + units group2...etc)
LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Bremmer

  • Guest
Re:annoying foreach problem
« Reply #2 on: 25 Jun 2003, 19:32:21 »
Hello Pablom

Try putting pipebomb in double inverted commas, like this ->

"_x removemagazines ""pipebomb""" foreach (units group1 + units group2...etc)

I think you need at least v1.75 to make this work though...

Cheers

[edit] Must be getting old ... my typing is slowing down ;) [/edit]
« Last Edit: 25 Jun 2003, 19:34:03 by Bremmer »

Offline .pablo.

  • Former Staff
  • ****
  • When in doubt, empty the magazine.
Re:annoying foreach problem
« Reply #3 on: 25 Jun 2003, 20:57:20 »
works perfectly now, thanks a lot!

edit:
another quick question, how do i add binoculars to the weapon loadout options before a mission?  do they go under weapons or magazines?
« Last Edit: 25 Jun 2003, 21:22:05 by pablom123 »

Offline Gielovic

  • Contributing Member
  • **
Re:annoying foreach problem
« Reply #4 on: 25 Jun 2003, 21:43:43 »
i think addweapon binocular

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:annoying foreach problem
« Reply #5 on: 25 Jun 2003, 21:50:15 »
Double inverted commas???  Heh...it's called a QUOTE.

Doolittle

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:annoying foreach problem
« Reply #6 on: 25 Jun 2003, 22:09:36 »
binocs go under weapons me thinks ;D

but u cud try dt :P

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Bremmer

  • Guest
Re:annoying foreach problem
« Reply #7 on: 25 Jun 2003, 22:43:58 »
Quote
Double inverted commas???  Heh...it's called a QUOTE.

 ???

/baffled