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.

Tcl error [pub:delgreet]: extra characters after close-quote

Help for those learning Tcl or writing their own scripts.
Post Reply
a
ache
Voice
Posts: 14
Joined: Fri Oct 14, 2005 7:27 am

Tcl error [pub:delgreet]: extra characters after close-quote

Post by ache »

I can´t seem to find the problem with this.
I get this error:

Code: Select all

Tcl error [pub:delgreet]: extra characters after close-quote
This is the code i have atm:

Code: Select all

proc pub:delgreet { nick uhost handle channel arguments } {
  set greetdb "scripts/charlie.tcl/greet.db"
  list arguments $arguments
  set greetnick [lindex $arguments 0]
  set greetchannel [lindex $arguments 1]
  set searchString "$greetchannel $greetnick"
  set greetChannel [open $greetdb "r"]
  set greetData [read $greetChannel]
  close $greetChannel
  set greetData [split $greetData "\n"]
  if {($greetchannel == "ALL")} {
    set greetIndex [lsearch -all $greetData *$greetnick*]
    foreach { greets } $greetIndex { 
      set greetData [lreplace $greetData $greetIndex $greetIndex]
    }
    putquick "NOTICE $nick :All greets for $greetnick has been removed."
  } elseif {([string index $greetchannel 0]=="#")} {
    set greetIndex [lsearch $greetData $searchString*]
    set greetData [lreplace $greetData $greetIndex $greetIndex]
    putquick "NOTICE $nick :Greeting for $greetnick has been removed from channel $greetchan."
  }	elseif {([string range $greetchannel 0 2]=="all")} {  
    set greetIndex [lsearch $greetData $searchString*]
    set greetData [lreplace $greetData $greetIndex $greetIndex]
    putquick "NOTICE $nick :Greeting for $greetnick has been removed from the "all" block."
  } else {
    putquick "NOTICE $nick :Missing parameter! \026!chelp !delgreet\026 for more info."
    return
  }
  set greetChannel [open $greetdb "w"]
  set greetData [join $greetData "\n"]
  puts -nonewline $greetChannel "$greetData\n"
  close $greetChannel
}
r
ranny
Halfop
Posts: 49
Joined: Wed Jun 22, 2005 2:00 pm
Location: switzerland

Post by ranny »

hello,

replace

Code: Select all

putquick "NOTICE $nick :Greeting for $greetnick has been removed from the "all" block." 
with

Code: Select all

putquick "NOTICE $nick :Greeting for $greetnick has been removed from the \"all\" block." 
a
ache
Voice
Posts: 14
Joined: Fri Oct 14, 2005 7:27 am

Post by ache »

ahh :)
thank you ranny.
Post Reply