Advertisement

Author Topic: isNull issue (SOLVED)  (Read 243 times)

0 Members and 1 Guest are viewing this topic.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
isNull issue (SOLVED)
« on: 06 Dec 2008, 02:04:16 »
Well I find this a bit odd, since it seems as if many others have used similar syntax:

Trigger1
Condition: isNull soldier_1
OnAct: hint "The soldier is null"

SoldierWB
Name: soldier_1
Presence: 50%

When I preview, irregardless if the soldier is present or not, nothing displays.

I'm running v1.14 - is this maybe the issue? I can't seem to find any explanation...  :dunno:
« Last Edit: 06 Dec 2008, 05:36:46 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: isNull issue
« Reply #1 on: 06 Dec 2008, 02:47:38 »
mmm, might be soldier_1 isNil when the soldier is not present.
You might try: (isNull soldier_1) || (isNil "soldier_1")

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: isNull issue
« Reply #2 on: 06 Dec 2008, 05:18:16 »
Interesting. I guess the whole null versus nil thing is a wee confusing.

Thanks mandoble, you were indeed right!
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08