Print name when client crashes

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Print name when client crashes

#1 Post by ZZZZZ » Tue Jul 15, 2014 11:58 pm

If the client crashes and the bot doesn't detect it, rather than the bot simply replying with the error message when you close the client

Code: Select all

2014-07-16 14:46:50 - E:\micromacro\scripts\rom/login.lua:75: E:/micromacro/scri
pts/rom/classes/pawn.lua:156: bad argument #1 to 'readfunc' ((null))
where could I add a print of the character name that crashed? That way it isn't a guessing game when logging mini-game alts back in.

Thanks

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Print name when client crashes

#2 Post by lisa » Wed Jul 16, 2014 2:18 am

Does it also print .
Attached game client has crashed. Killing client
or
The game client did not crash.
I am guessing it does, reason I ask is because in functions.lua line 352-364 you will find a hint at what you could do =)
Hmm unless I haven't updated rombot in a while and the lines won't mean anything, search for

Code: Select all

function errorCallback(script, line, message)
=)

Spoiler alert (incase you didn't quite understand my hint),
this is in my logger function.

Code: Select all

function logtrace()
	errorCallback()
	logInfo(player.Name,debug.traceback(),true,"crashes")
end

if logerrors then
	atError(logtrace)
end
TBH just get my logger function and change top to true.

Code: Select all

local logerrors = false -- change to true if you want to log the errors the bot has
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

ZZZZZ
Posts: 513
Joined: Sun Oct 21, 2012 1:42 am

Re: Print name when client crashes

#3 Post by ZZZZZ » Wed Jul 16, 2014 5:40 am

Not a fan of opening log files to look up something like that, seems a waste of time to me lol, I just went with your first 'hint' and added player.Name to the game crash error.

Code: Select all

The game client did not crash. (Character: Example)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 162 guests