You're simply misusing the evaluation brackets, and ironically you don't even need them. Moreover you're trying to set something that's not even a variable (not prefixed with %)

Btw you realise $nick is only filled in certain events where a nickname caused the event to trigger, right?

Here's an example using $me instead of $nick, which is always filled:

; /saywhat?

alias saywhat? {
var %x = 1
$iif(%x == 1,set -s %user. $+ $me 1)
unset -s %user. [ $+ [ $me ] ]
}

Btw $iif is in general not to be used to let commands trigger in, although it's possible. If you want to execute commands use /if:

if (%x == 1) set -s %user. $+ $me 1

I think your explanation makes no sense really, since the way you use the evaluation brackets, $nick doesn' even evaluate to $null, it stays as "$nick".

Try this:

alias saywhat?? {
var %x = 1
$iif(%x == 1,set -s %user. [ $+ $nick ] 1)
unset -s %user. [ $+ $nick ]
}

/saywhat??
--> * Set %user.$nick to 1
--> * Unset %user.$nick

However remove the evaluation brackets to let everything evaluate properly and you get:

alias saywhat??? {
var %x = 1
$iif(%x == 1,set -s %user. $+ $nick 1)
unset -s %user. [ $+ [ $nick ] ]
}

/saywhat???
--> * Set %user. to 1
--> * Unset %user.

As you can see, $nick rightfully evaluated to $null, since $nick isn't filled if you call it from the commandline.

The only correct solution here is the first, so that's the one you should be using. It's also the one with the least heavy syntax, as you don't need evaluation brackets ever when setting a dynamic variable.




Gone.