eggdrop - TCL if inside if -
i'm trying make display contents of if statement if if inside it, returning desired value. doesn't work, guess it's not how in tcl. advice appreciated.
if {$firstq == 1} { set sql "select * users username='$text' , ircban='yes' limit 1" set result [mysqlsel $db_handle $sql] if{$result == 1} { putquick "notice $nick :user banned." } elseif{$result == 0} { putquick "notice $nick :user not banned." }
you missing closing brace after elseif
, need spaces after if
, elseif
:
if {$firstq == 1} { set sql "select * users username='$text' , ircban='yes' limit 1" set result [mysqlsel $db_handle $sql] if {$result == 1} { ;# <-- need space after if putquick "notice $nick :user banned." } elseif {$result == 0} { ;# <-- need space after elseif putquick "notice $nick :user not banned." } ;# <-- missing closing brace }
Comments
Post a Comment