[11:18] Tcl error [g_setmenext2]: can't read "nexttxt": no such variable
the code:
-------------------------------------
set g_nexttxt [list ]
if {![file readable g_nexttxt]} {
set fileio [open g_nexttxt "w"]
puts $fileio ""
close $fileio
}
proc g_nexttxt { } {
global g_nexttxt
set g_nexttxt [linsert $nexttxt end $nick]
set fileio [open nexttxt "w"]
puts $fileio $nexttxt
flush $fileio
close $fileio
}
---------------------------------
set clr "-"
proc g_setmenext2 { nick uhost handle channel arg } {
global g_active g_shutupchan g_q1 clr g_q2 g_q3 g_q4 g_q5 g_q6 g_q7 g_q8 g_pickupchan g_privategatherchannel g_nexttxt
if { [matchattr $handle H] } {
if { $g_shutupchan == 0 } {
if { $g_active == 0 } {
if { $channel == $g_privategatherchannel } {
if { ( $nick == $g_q1 ) || ( $nick == $g_q2 ) || ( $nick == $g_q3 ) || ( $nick == $g_q4 ) || ( $nick == $g_q5 ) || ( $nick == $g_q6 ) || ( $nick == $g_q7 ) || ( $nick == $g_q8 ) } {
putserv "PRIVMSG $nick :14,1\[7«0 1.: $g_q1 2.: $g_q2 3.: $g_q3 4.: $g_q4 5.: $g_q5 6.: $g_q6 7.: $g_q7 8.: $g_q8 7»14]"
return 0
}
}
if { $g_q1 == $clr } {
if { [matchattr $handle H] } {
set g_q1 "$nick"
g_nexttxt
putserv "NOTICE $nick :14,1\[7«0 You Have 5 minutes to do a game. Hurry up! 7»14]"
...
....
....
etc..
does anyone know? :/ the file g_nexttxt is created but is empty and when g_q1 convert the nick.. then i want to save it in one .txt the nick..
and when i press !list i want to read the .txt the nick and i see the Result like 1. MYNICK
thnx..
Last edited by ultralord on Fri Oct 12, 2007 4:10 am, edited 1 time in total.