Home   Help Search Login Register  

Author Topic: waht do i wrong  (Read 1000 times)

0 Members and 1 Guest are viewing this topic.

maxim

  • Guest
waht do i wrong
« on: 16 Sep 2004, 14:35:21 »
? (_this select 1 == carsalesman) : _house = carhouse; goto "chairmake"
? (_this select 1 != carsalesman) : goto "exit"

#chairmake

_obj = "Chair" CreateVehicle [0,0,0]
_distance = 5
_dir = getDir _house

_xpos = getPos _house select 0 - (_distance * cos _dir)
_zpos = getPos _house select 1 + (_distance * sin _dir)
_ypos = 0

_obj setPos [_xpos,_zpos,_ypos]

exit

#exit
exit

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:waht do i wrong
« Reply #1 on: 16 Sep 2004, 15:19:44 »
this seems to be wrong:

? (_this select 1 != carsalesman) : goto "exit"

I think it should be like this:

?! (_this select 1 == carsalesman) : goto "exit"

try this ;) I hope this helps.

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re:waht do i wrong
« Reply #2 on: 16 Sep 2004, 21:42:27 »
Is carsalesman a string value within the array?  If so then you need quotes:

? (_this select 1 == "carsalesman") : _house = carhouse; goto "chairmake"
? (_this select 1 != "carsalesman") : goto "exit"