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

Popular posts from this blog

c# - OpenXML hanging while writing elements -

php - regexp cyrillic filename not matches -

sql - Select Query has unexpected multiple records (MS Access) -