[16:42] Tcl error [spr:setweapon]: wrong # args: should be "spr:setweapon nick host handle chan arg"
Here are the bits of code that relate to the bit that's getting the error:
Code: Select all
bind msg - spr spr:setweapon
proc spr:setweapon {nick host handle chan arg} {
global botnick spr_player1 spr_player2 spr_started spr_playerstat spr_player1_w spr_player2_w
if {$spr_started == 0} {
puthelp "PRIVMSG $chan :Game not running. Type !spr <nick> to play."
return 0
}
if {$arg == ""} {
puthelp "notice $nick :You need to /msg $botnick <scissor, paper or rock>"
}
if {$nick == $spr_player1} {
if {$arg == "scissor"} {
set spr_player1_w scissor
}
if {$arg == "paper"} {
set spr_player1_w paper
}
if {$arg == "rock"} {
set spr_player1_w rock
}
}
if {$nick == $spr_player2} {
if {$arg == "scissor"} {
set spr_player2_w scissor
}
if {$arg == "paper"} {
set spr_player2_w paper
}
if {$arg == "rock"} {
set spr_player2_w rock
}
}
spr:checkwin
}
Any ideas?