This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

missing close-brace

Help for those learning Tcl or writing their own scripts.
Post Reply
w
whittinghamj
Op
Posts: 103
Joined: Sun May 21, 2006 4:50 pm

missing close-brace

Post by whittinghamj »

any ideas what is wrong with this code guys n girlers?

Code: Select all

bind pub -|o !age age
proc age {nick uhost hand channel text} {
   if {[llength $text] > 1} { 
      puthelp "PRIVMSG $chan :You were supposed to look for a nick.. not more" 
   } elseif {![lsearch $::backupfile $text]} { 
      puthelp "PRIVMSG $chan :I don't remember seing $text 
   } else { 
      puthelp "PRIVMSG $chan :$text has been in $chan since [lindex $::userjoindata [lsearch $::backupfile $nick] 2] 
   }
error message is this

Code: Select all

[04:45] Tcl error in file 'zeus.conf':
[04:45] missing close-brace
    while executing
"proc age {nick uhost hand channel text} {
   if {[llength $text] > 1} {
      puthelp "PRIVMSG $chan :You were supposed to look for a nick.. not more..."
    (file "scripts/lobby/test.tcl" line 2)
    invoked from within
"source scripts/lobby/test.tcl"
    (file "zeus.conf" line 84)
[04:45] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
[f4w@lobby-poseidon eggdrop]$
o
oxygen
Voice
Posts: 22
Joined: Mon Sep 05, 2005 2:22 pm
Location: Germany

Post by oxygen »

Hello whittinghamj.

I didn't test the script, but it should work now:

Code: Select all

bind pub -|o !age age
proc age {nick uhost hand channel text} {
   if {[llength $text] > 1} {
      puthelp "PRIVMSG $chan :You were supposed to look for a nick.. not more"
   } elseif {![lsearch $::backupfile $text]} { 
      puthelp "PRIVMSG $chan :I don't remember seing $text"
   } else {
      puthelp "PRIVMSG $chan :$text has been in $chan since [lindex $::userjoindata [lsearch $::backupfile $nick] 2]"
   }
 }
 putlog "age.tcl loaded"
Regards,
~oxygen
w
whittinghamj
Op
Posts: 103
Joined: Sun May 21, 2006 4:50 pm

Post by whittinghamj »

thanks - god bless you my son
Post Reply