tested with version 6.03
there have been several posts over the past year about lilne length problems with $iif -- in this example I'll illustrate that line length alone may not be the source of the "Invalid Format" messages.
First, a code snippet (from my nicklist popup) that generates an "Invalid Format" error:
.Temp Ban, Kick (why?):$iif((PonyTrainer ison $chan), .msg $chan !ktban $$?="Time in Seconds:" $$1 $$?="Reason for Kick:", /ban -u $+ $$?="Time in Seconds:" # $$1 8 | /timer 1 3 /kick # $$1 $$?="Reason for Kick:" )
clearly a very long line for a popup, but if I recode it like this, it works just fine:
.Temp Ban, Kick (why?):{
$iif((PonyTrainer ison $chan), .msg $chan !ktban $$?="Time in Seconds:" $$1 $$?="Reason for Kick:", $&
/ban -u $+ $$?="Time in Seconds:" # $$1 8 | /timer 1 3 /kick # $$1 $$?="Reason for Kick:" )
}
consider this second example, also from my nicklist popup, which also generates an error:
.Ban, Kick:$iif((PonyTrainer ison $chan), .msg $chan !kban $$1, /ban # $$1 8 | /timer 1 3 /kick # $$1 )
this snippet is less than 100 characters long and it is an error, but recode it like this, and it works:
.Ban, Kick:{
$iif((PonyTrainer ison $chan), .msg $chan !kban $$1, $&
/ban # $$1 8 | /timer 1 3 /kick # $$1 )
}
I think that it's the complexity of the $iif arguments that causes the "Invalid Format" error, not [just] the line length -- in fact, I'm going to go out on a limb and claim that it's the "|" character that is the source of the problem. I've tried other, even longer lines in the popup (168 characters) that do NOT have the "|" character and they do NOT generate an "Invalid Format" error.