Hello,
ive been trying to edit the auto reset into delete only those who has score 0, i dont want to reset the score everymonth but i want to delete those who has score 0. can anybody help me please...
on the score file it looks like:
hebron 10
cipe 7
born 0
bir 0
nah i want to del those who has 0 score.
proc KAOS_NewMonth {min hour day month year} {
global KAOSScoreFile KAOSScore KAOSLastMonthScores
set cmonth [expr $month +1]
set lmonth [KAOSLastMonthName $cmonth]
set f [open $KAOSMonthFileName w]
set s 0
foreach n [lsort -decreasing -command sort_KAOSScore [array names KAOSScore]] {
puts $f "$n $KAOSScore($n)"
if {$s < 3} {
if {$KAOSScore($n) > 0} {
set KAOSLastMonthScores($s) "$n $KAOSScore($n)"
} {
set KAOSLastMonthScores($s) "Nobody 0"
}
}
incr s
}
close $f
KAOS_WriteCFG
if [info exists KAOSScore] {unset KAOSScore}
set f [open $KAOSScoreFile w]
puts $f "Nobody 0"
close $f
demond wrote:heh, another animated gif dude, posting unindented code with quote tags
how about not saving names with zero score in the first place?
Perhaps its animated gif week and noone told us?
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born