hi there
i constantly get the error "unmatched open quote in list" whenever i try to save a topic including one or more "s to a file. anybody knows how to get rid of this? thx =)
well i try to read the infos from the file the following way:
--- cut ---
set temp [gets $dateichen ]
close $dateichen
set nickname [lindex $temp 0]
set channel [lindex $temp 1]
set hostmask [lindex $temp 2]
set weekday [lindex $temp 3]
set month [lindex $temp 4]
set day [lindex $temp 5]
set daytime [lindex $temp 6]
set year [lindex $temp 7]
set info [lrange $temp 8 [llength $temp]]
--- cut ----
well if $info contains an " then i get the error, thats it
any idea?
<font size=-1>[ This Message was edited by: dopestar on 2001-11-20 08:59 ]</font>
the reason for the added characters is that your variable $info now has become a list of separated items. You will have to "join" these separated items. Something like:
set info [join [lrange $temp 8 [llength $temp]]]
For some reason list operations on strings are often used in eggdrop tcl's.
Why not using a (faster) string operation (scan) on a string?
gets $fd temp
close $dateichen
scan $temp "%s %s %s %s %s %s %s %s %[^n]" nickname channel hostmask weekday month day daytime year info
Make sure that the total number of items (9: nickname, channel etc.) is available, else the scan will break.