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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -