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.

puthelp/serv/quick problem

Old posts that have not been replied to for several years.
Locked
N
Nada_Surf

Post by Nada_Surf »

I'm using a series of puthelp statements to read lines of a file to a user... however each time the code is run not all of the puthelp statements get called, the statements are valid and no error is given, what could the problem be?
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

Could you give an example of the code, expected output and real output please.
N
Nada_Surf

Post by Nada_Surf »

file contents:

All Time Top Score Records:
LeAlTeRnATiF 3365
LeAlTeRnaTiF 2034
scaly 2001
she- 1734
black_circle 1733

Last weeks Top Scores:
LeAlTeRnATiF 3365
Heckto 1219
GothGirl 375

All Time 2 sec Challenge scores:
black_circle 49
mindee 40
Mindee 31
Zoo 17
black_circle 15

Last Weeks
mindi 31
ZOO 17
black_circle 15



PROC:


proc Show2SecScores {nick host hand chan text} {
global Channel

set ScoreFileList ""
set ScoreFileLines 0
set TSFile [open "~/bot/scripts/topscores.txt" r]

while {![eof $TSFile]} {
lappend ScoreFileList [gets $TSFile]
incr ScoreFileLines
}

puthelp "PRIVMSG $nick :0314**Crypto 2 Sec Challenge Top Scores**"
puthelp "PRIVMSG $nick :030."
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 12]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 13]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 14]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 15]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 16]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 17]"
puthelp "PRIVMSG $nick :030work!"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 19]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 20]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 21]"
puthelp "PRIVMSG $nick :0314[lindex $ScoreFileList 22]"


close $TSFile
}

Expected output:

**Crypto 2 Sec Challenge Top Scores**

All Time 2 sec Challenge scores:
.
black_circle 49
mindee 40
Mindee 31
Zoo 17
black_circle 15
work!
Last Weeks
mindi 31
ZOO 17
black_circle 15


Actual output:

**Crypto 2 Sec Challenge Top Scores**

All Time 2 sec Challenge scores:
.
black_circle 49
mindee 40
Mindee 31
Zoo 17
black_circle 15
work!
Last Weeks
mindi 31


ie. the two final lines are not being printed.

p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

A series of putlog commands, and enabling +d console mode, should help determine if the script is even reading the file, or if this is an issue with the queue system.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

nah, its just that he's got $double-help set to 0. set it to 1.
Locked