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.
Old posts that have not been replied to for several years.
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jun 10, 2003 11:56 am
I haven't got any "no such element in array" errors in the tsunami.tcl and/or even not in the njf.tcl (version 0.3) wich should be working fine.
Once the game is over, the king and the pawn go back in the same box.
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Tue Jun 10, 2003 12:00 pm
It looks like you initialize the array at the beginning of the script. So if somebody does a .+chan after it's loaded, that entry won't exist. Maybe instead you should use if {![info exists bla(chan)]} {set bla(chan) 0} at the top of each proc where you access the array? Or better, put it in a proc called init_chan $chan, which does that line.
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Jun 11, 2003 12:52 am
Yes, in this one I have forgot to add this, but in the njf.tcl it exists:
# fix after an .chanset on a channel
if {![info exists val([strlwr $chan])]} { set val([strlwr $chan]) 0 }
For the tsunami.tcl this should be somehting like this:
Code: Select all
if {![info exists bla([strlwr $chan])]} { set bla([strlwr $chan]) 0 }
Anyway, as I have wrote in it is a beta thing so yah, it's buggy.
Once the game is over, the king and the pawn go back in the same box.
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Jun 11, 2003 3:04 am
Also, replace from:
Code: Select all
if {[string length [join [split $text] ""]] > "$linelength"} {
to:
Code: Select all
if {[llength [split $text ""]] > "$linelength"} {
and there goes another fixed "bug"
Ps: the "if {![info exists bla([strlwr $chan])]} { set bla([strlwr $chan]) 0 } " should be added before the "set linelength [lindex [split $::ltl ":"] 3]" somewhere..
Once the game is over, the king and the pawn go back in the same box.
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Jun 11, 2003 5:33 am
Replace from:
Code: Select all
if {[string match [strlwr [strlwr $chan]] $arr_part]} {
to:
Code: Select all
if {[string match [strlwr $chan] $arr_part]} {
there is no need to make it lower case twice, duno how I've missed that.
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jun 11, 2003 11:29 am
ok I added the "
if {![info exists bla([strlwr $chan])]} { set bla([strlwr $chan]) 0 } " right before the "
set linelength... ", so now its:
Code: Select all
if {![info exists bla([strlwr $chan])]} { set bla([strlwr $chan]) 0 }
set linelength [lindex [split $::ltl ":"] 3]
and I replaced those 2 codes u told me to
--but should I keep this code ?:
Code: Select all
# array fix #
foreach chan [channels] {
set bla([strlwr $chan]) 0
}
or should I remove it ?
caesar
Mint Rubber
Posts: 3776 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Jun 11, 2003 11:45 am
Yes, it should be there.
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jun 11, 2003 12:08 pm
ok thanx
No usch errors are appearing anymore