If command not working? - 09/02/14 06:05 AM
Hello I am attempting to allow people to enable and disable commands in a multi-room bot only in the channel its disabled. The %commands.rulerz1364 Off does get created fine using the !commandsoff command.
The command will work if I just make the if variable %commands without the .# after.
I have tried getting rid of the # sign and making it just %commands.rulerz1364 using the $right(#,-1) command but did not work.
My problem seams to lie with the "%commands. $+ #" when being checked during the !drink command.
I am sure this is something simple I have tried removing it all and typing it out again to confirm syntax.
I have also tried if ($+(% $+ commands. $+ #) = Off) {} but nothing...
Here is the code:
Thanks for any support on this.
The command will work if I just make the if variable %commands without the .# after.
I have tried getting rid of the # sign and making it just %commands.rulerz1364 using the $right(#,-1) command but did not work.
My problem seams to lie with the "%commands. $+ #" when being checked during the !drink command.
I am sure this is something simple I have tried removing it all and typing it out again to confirm syntax.
I have also tried if ($+(% $+ commands. $+ #) = Off) {} but nothing...
Here is the code:
Code:
on *:text:!commandsoff:#:{ if ( $nick = rulerz1364 ) { set %commands. $+ # Off msg # Commands have been turned off } } on *:text:!commandson:#:{ if ( $nick = rulerz1364 ) { set %commands. $+ # On msg # Commands have been turned on } } on *:text:!drink:#:{ if ( %commands. $+ # = Off ) { return } else { msg # Gives $nick a Drink } }
Thanks for any support on this.