Home   Help Search Login Register  

Author Topic: Check boolean?  (Read 684 times)

0 Members and 2 Guests are viewing this topic.

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Check boolean?
« on: 14 Oct 2004, 11:05:38 »
I have a small problem with the fleeing command.
It says returned value= "Boolean" I see that boolean is true or false, but when I ask:

?(fleeing leader _group == true):goto "End"

it complains "?(fleeing leader _group == true):goto "End" error == type boolean, expected number, string"

so how can I check boolean with this? The returned value IS true or false, I checked it with the format command...

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Check boolean?
« Reply #1 on: 14 Oct 2004, 11:57:05 »
If:
fleeing leader _group
is a boolean (I have not checked this), then the line of code should be:
Code: [Select]
?(fleeing leader _group):goto "End"You don't need the ==True.

Offline Peter_Bullet

  • Members
  • *
  • "The evil that men do lives on and on"
Re:Check boolean?
« Reply #2 on: 14 Oct 2004, 13:47:51 »
LOL xD!!!!!!!!

Thanks dude... I'm not new at scripting, but I never thought that "hey, that's the way it is always!", even as it's very commonly used!  ;D

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:Check boolean?
« Reply #3 on: 14 Oct 2004, 16:10:14 »
You are very welcome