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.

wrong # args: should be "proc name args body"

Old posts that have not been replied to for several years.
Locked
K
Kieren

wrong # args: should be "proc name args body"

Post by Kieren »

hey, im getting the error message:

'wrong # args: should be "proc name args body" while executing
"proc get_score { args } {
global nick wscorefile chan allscores
set allscores ""
set fs [open $wscorefile r]"'

when i try to run my bot. The part of script that isn't working is:

#Recored score
proc get_score { args } {
global nick wscorefile chan allscores
set allscores ""
set fs [open $wscorefile r]

#load its contents into a list
while {![eof $fs]} {
set grabscore [split [gets $fs] |]
set sortscore [lrange $grabscore 0 1]
lappend allscores [split $sortscore]
}
set allscores [lsort -real -index 1 $allscores]
lreverse

#Close socre file
close $fs
}

Anyone know how to go about solving this?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

you probably have a missing } in your get_score or you pasted the proc via pico so it has multiple lines.
Locked