Tcl error [setwarinfo]: wrong # args: should be "set varName ?newValue?"
but I can't find the part of my proc that's the problem. Can anyone help plz? Below is the bind and proc:
Code: Select all
bind pub - !setwar setwarinfo
proc setwarinfo { nick uhost hand chan arg } {
global ws_clan
global ws_maps
global ws_players
global ws_time
global ws_day
global ws_extras
if {!([string match -nocase $arg ""])} {
set ws_info [split $arg]
set count 0
while {!([string match -nocase [lindex $ws_info $count] ""])} {
if {$count == 0} {
set ws_players [lindex $ws_info $count]
} elseif {$count == 1} {
set ws_day [lindex $ws_info $count]
} elseif {$count == 2} {
set ws_clan [lindex $ws_info $count]
} elseif {$count == 3} {
set ws_time [lindex $ws_info $count]
} elseif {$count == 4} {
set ws_maps [lindex $ws_info $count]
} else {
set ws_extras $ws_extras [lindex $ws_info $count]
}
set count $count + 1
}
if {$count < 5} {
putquick "PRIVMSG $chan :!setwar usage is: !setwar <players> <day> <clan> <time> <maps> <extras (optional)>"
} else {
putquick "PRIVMSG $chan :War set: $ws_players war $ws_day vs $ws_clan @ $ws_time on $ws_maps \[{$ws_extras}\]: 12\[USAGE\] Use !av, !ma, and !na to set ur status."
}
} else {
putquick "PRIVMSG $chan :!setwar usage is: !setwar <players> <day> <clan> <time> <maps> <extras (optional)>"
}
}