| View previous topic :: View next topic |
| Author |
Message |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Sun Apr 09, 2006 1:27 pm Post subject: timers keep crashing our bot |
|
|
Hi --- We are very new to eggdrop and have been having loads of problems with timers crashing our bot. Because we are so new to it, we have no idea where to find these timers, but assume they are in FullTriviabot65 script file. We are so afraid of changing this file with such limited knowledge and therefore totally destroying the bot (we dont really want to start from scratch again)
Is there anyone here who can give a laymans view to timers, where to find them, how to correct them etc
Many thanks in advance  |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Sun Apr 09, 2006 5:06 pm Post subject: Re: timers keep crashing our bot |
|
|
| Swift wrote: | Hi --- We are very new to eggdrop and have been having loads of problems with timers crashing our bot. Because we are so new to it, we have no idea where to find these timers, but assume they are in FullTriviabot65 script file. We are so afraid of changing this file with such limited knowledge and therefore totally destroying the bot (we dont really want to start from scratch again)
Is there anyone here who can give a laymans view to timers, where to find them, how to correct them etc
Many thanks in advance  | Nerfbendr's Trivia is a damn complicated piece of work, be very very careful messing with the actual tcl, you could moofie super-quick. Have you read the excellent tutorial/manual included yet? Be sure not to allow any question marks (?) or quotation marks (") in any of the question files, as this will also give a timer error and make the bot freeze and/or die. _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Sun Apr 09, 2006 5:10 pm Post subject: |
|
|
Many thanks for your reply. Which manual are u referring to?
Yes, we are gradually going through all our question files removing ? and " as well as # [ ] { } ' ! --- it seems there are an awful lot of symbols that dont agree with eggdrop!!!!
Was I right in saying the timers are in FullTriviabot65 or do they appear in another script file?
Any further help would be greatly apprecaited. Thanks  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Apr 10, 2006 3:12 am Post subject: |
|
|
your problem description is too vague
provide logs if you want more elaborated opinions _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Mon Apr 10, 2006 3:17 am Post subject: |
|
|
Ok this the a log of the problem yestereday:-
[08:47] Tcl error in script for 'timer7776':
[08:47] couldn't open "TriviaMonthlyScores/Apr2006.txt": too many open files
[08:48] Tcl error in script for 'timer7777':
[08:48] couldn't open "TriviaBankTotals.txt": too many open files
[08:48] Tcl error in script for 'timer7778':
[08:48] couldn't open "TriviaHangingReport.txt": too many open files
[08:52] Tcl error [TriviaWelcome]: couldn't open "GenericScoresTEXT/ThisMonth.txt": too many open files
It is often the scores timer but can also be the logtimer.
Hope you can help  |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Apr 10, 2006 4:06 am Post subject: |
|
|
a buggy script, not properly closing files _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Mon Apr 10, 2006 4:10 am Post subject: |
|
|
| So, is there a way to correct this? An easy way I mean lol |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Apr 10, 2006 4:18 am Post subject: |
|
|
no
basically, you have 3 options: 1) contact the author, 2) post the script and hope someone would bother to debug it or 3) learn tcl and fix it yourself
I'd guess none of these is particularly appealing to you _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Mon Apr 10, 2006 7:24 am Post subject: |
|
|
lol, well we have contacted the owner, twice, but to no avail. As to posting the script, we are still not over sure which file these timers can be found in and this should give you the answer to the last option of correcting it ourselves lol
I have to admit eggdrop is one complicated bot!!!!
Thanks for your help anyway Much appreciated
PS I still think these timers are in FullTriviabot65 --- am i right? |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Tue Apr 11, 2006 3:50 pm Post subject: |
|
|
ok another error message today and bot crashed:
[19:10] Tcl error [TriviaWelcome]: couldn't open "GenericScoresTEXT/ThisMonth.txt": too many open files
[19:10] <<Jimbo>> !*! !repeat
[19:10] <<Jimbo>> !*! !trivia
[19:11] Tcl error [TriviaWelcome]: couldn't open "GenericScoresTEXT/ThisMonth.txt": too many open files
[19:14] ERROR writing user file.
Think this is the script that refers to it (not over sure tho):-
## Autogreeting routine!
proc TriviaWelcome {nick uhost hand chan} {
global Greet1ToUse Greet2ToUse yearscore nameofbot antifloodenable usercounter triviachannel autovoiceenable autovoicescore autovoicesynch weekfilename monthfilename yearfilename dayfilename autojoin alreadygoing joinmsg server hintalreadygiven
## If autovoicing is enabled, the bot checks to see if the user that joined the channel has
## a score of x or more (defined in the config!), if so and if the bot is able to voice
## in the channel, then that user gets voiced...on entry to the channel only!
## (The bot won't re-voice them if they get de-voiced in the channel...sorry!)
if {$nick == $nameofbot} {return}
if {[string tolower $chan] != [string tolower $triviachannel]} {return}
if {$antifloodenable == 1} {
foreach usercounter [array names commandusers] {
if {[lindex $commandusers($usercounter) 1] == $uhost} {
return
}
}
set commandusers($usercounter) "$nick $uhost"
}
set greetknownplayers 1
if {$greetknownplayers == 1} {
if {[info exists yearscore($nick)]} {
putquick "privmsg $triviachannel :[get_Greet1] $nick...[get_Greet2]"
}
}
if {$autovoiceenable == 1} {
set scoreplayer $nick
regsub -all \[{}] $scoreplayer "~" scoreplayer
regsub -all {[\\]} $scoreplayer "|" scoreplayer
### END OF NICKFIX FOR LATEST SLASH GLITCH (FIXED AS OF V6.0)
set foundflag 0
if {$autovoicesynch == 0} {set scorefiletouse "GenericScoresTEXT/Today.txt"}
if {$autovoicesynch == 1} {set scorefiletouse "GenericScoresTEXT/ThisWeek.txt"}
if {$autovoicesynch == 2} {set scorefiletouse "GenericScoresTEXT/ThisMonth.txt"}
if {$autovoicesynch == 3} {set scorefiletouse "GenericScoresTEXT/ThisYear.txt"}
set f [open $scorefiletouse r]
if [file exists $scorefiletouse] {
while {[gets $f tally] != -1} {
set checker [lindex $tally 0]
if {$checker == $scoreplayer} {
if {[lindex $tally 1] >= $autovoicescore} {
pushmode $triviachannel +v $nick
}
}
}
close $f
}
}
Any ideas please would be gratefully received  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Apr 11, 2006 6:10 pm Post subject: |
|
|
MoxQuizz -- A quiz/trivia script for IRC eggdrop bots. Free and it works as expected. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Apr 12, 2006 5:47 am Post subject: |
|
|
Sometimes your shell might be having problems from outer programs that may cause applications not to be able to open files anymore (like what's happening with your eggdrop). If that's the case, you may want to contact your shell admin, otherwise use another script.
One thing you can try is this:
| Code: | set f [open $scorefiletouse r]
if [file exists $scorefiletouse] {
while {[gets $f tally] != -1} {
set checker [lindex $tally 0]
if {$checker == $scoreplayer} {
if {[lindex $tally 1] >= $autovoicescore} {
pushmode $triviachannel +v $nick
}
}
}
close $f
}
|
move close $f after the last brace.
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Wed Apr 12, 2006 7:37 am Post subject: |
|
|
Thanks very much for your help. We will check this out  |
|
| Back to top |
|
 |
Swift Voice

Joined: 09 Apr 2006 Posts: 27 Location: UK
|
Posted: Wed Apr 12, 2006 4:22 pm Post subject: |
|
|
I tried it and it crashed the bot. There were actually 5 brace in the script so I put it after the 5th. Was that right?
When it crashed it told of an error in Fulltriviabot65 and said it couldnt find config file so I had to replace the original and all was well (until the next time! lol)
pushmode $triviachannel +v $nick
}
}
}
close $f
}
} |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Wed Apr 12, 2006 4:34 pm Post subject: closing braces |
|
|
Sir_Fz gave it to you correctly, you need four (4) closing braces before 'close', like this:
| Code: | pushmode $triviachannel +v $nick
}
}
}
}
close $f |
|
|
| Back to top |
|
 |
|