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.

Search found 15 matches

by bsdkid
Sat Dec 31, 2005 12:16 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

Currently: expected integer but got "" Currently: while executing Currently: "incr sco $pointvalue" Currently: invoked from within Currently: "if [info exists score($lnick)] { Currently: set sco [lindex $score($lnick) 1] Currently: lset score($lnick) 1 [incr sco $pointvalue]...
by bsdkid
Sat Dec 31, 2005 12:13 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

I think something is wrong with this, after i reload the score array when the bot restart it screwed up.

Code: Select all

set f [open score.txt]
foreach line [split [read $f]] {
   foreach {n s} [split $line] {
      set score($n) [list $n $s]
   }
}
close $f 
by bsdkid
Sat Dec 31, 2005 12:03 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

how do i fix it demond?
by bsdkid
Fri Dec 30, 2005 7:21 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

demond, i got 1 small error when i next start the bot, after reload the score array it says Currently: expected integer but got "" Currently: while executing Currently: "lsort -integer -decreasing -index 1 $pairs" Currently: (procedure "first" line 102) Currently: invok...
by bsdkid
Thu Dec 29, 2005 10:17 pm
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

demond, I have one more question, How do i reload the score array when the bot start?
by bsdkid
Thu Dec 29, 2005 7:38 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

You are awesome demond, thanks :)
by bsdkid
Thu Dec 29, 2005 12:28 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

proc write_score {nick} { global scorefile points score if {![file exists $scorefile]} { set fd [open $scorefile w] close $fd } set lnick [string tolower $nick] if [info exists score($lnick)] { set sco [lindex $score($lnick) 1] lset score($lnick) 1 [incr sco $points] } { set score($lnick) [list $ni...
by bsdkid
Thu Dec 29, 2005 12:24 am
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

still get error demond

expected integer but got "bsdkid 9"
by bsdkid
Wed Dec 28, 2005 9:20 pm
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

demond, your script doesn't work good, it saves the score like this: bsdkid {bsdkid 6}, i just want bsdkid 6


and if second nick win i get this error.

[20:17] Tcl error [checkanswer]: expected integer but got "monk 6" and it swipped out the score array and write to file with null
by bsdkid
Tue Dec 27, 2005 8:28 pm
Forum: Scripting Help
Topic: help with array
Replies: 17
Views: 20297

help with array

Code: Select all

    if {[info exists score([string tolower $nick])]} {
		incr score([string tolower $nick]) $pointvalue
    } else {
		set score([string tolower $nick]) $pointvalue
    }

writescore $nick

Can you help me make it read BSDKID BSdKID and bsdKID be the same and keep the nick the way they are?
by bsdkid
Fri Dec 23, 2005 5:48 pm
Forum: Scripting Help
Topic: help with random
Replies: 7
Views: 10974

thx guys! great job :)
by bsdkid
Thu Dec 22, 2005 7:41 pm
Forum: Scripting Help
Topic: help with random
Replies: 7
Views: 10974

help with random

Can you help me make [rand 20] without repeating till all have been used?
by bsdkid
Thu Dec 08, 2005 3:12 pm
Forum: Scripting Help
Topic: memory leak
Replies: 7
Views: 12548

hey man, how do i remove nick in team array?
by bsdkid
Wed Dec 07, 2005 10:28 pm
Forum: Scripting Help
Topic: memory leak
Replies: 7
Views: 12548

Thank you De Kus!
by bsdkid
Wed Dec 07, 2005 1:18 pm
Forum: Scripting Help
Topic: memory leak
Replies: 7
Views: 12548

memory leak

problem solved. thanks guys!