Kirby commented on a Page, BNC manager  -  Feb 15, 2009

I just realized you've already been taught about $iif's. Sorry.

Hey zexxor.
$iif's are basically the identifier for the "if-then-else" parts of a script.

How $iif works: $iif(question,action if statement is true,action if statement is false)
So let's say you have a variable called %test, which has a value of 1. (%test 1 in your variables tab)

$iif(%test = 1,msg $active true,msg $active false)

Because %test = 1, it messages the active channel 'true'.
If you have similar actions in both the true and false portions of the $iif, you can put it in front of the $iif.
So the above one can be re-written as:

msg $active $iif(%test = 1,true,false)

Basically, $iif can just substitute parts whether or not the question is true or false.
Also, you can perform no action if the statement is false so therefore you can put nothing into the third parameter of the $iif, but you MUST have a second parameter always. :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.