exitOnError

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

exitOnError

#1 Post by sli »

Adds a new config option called exitOnError. Setting it to 1 will cause Kore to simply exit on a fatal error. Handy for using the bot inside a batch file or shell script. Untested, so lemme know if there's any problems.

EDIT: For some reason, saving the patch off here causes it to throw an error. So I've uploaded the working one here. Right click and save as to be sure it works.

This is what it's good for:

Code: Select all

:bot
start.exe
goto bot
or

Code: Select all

while [ 1 ]
do
    perl openkore.pl;
done
Last edited by sli on 01 Jun 2008, 13:27, edited 2 times in total.
cs : ee : realist

Kissa2k
Human
Human
Posts: 46
Joined: 27 Apr 2008, 12:52
Noob?: No
Location: Russia

Re: exitOnError

#2 Post by Kissa2k »

Why not just reconnect openkore when error occured?

sli
Perl Monk
Perl Monk
Posts: 810
Joined: 04 Apr 2008, 17:26
Noob?: No

Re: exitOnError

#3 Post by sli »

This only modifies fatal errors, which you can't come back from without restarting the bot.
cs : ee : realist

Post Reply