Page 1 of 1

Failed to save your character. You should relog now.

Posted: Wed Dec 17, 2014 6:20 pm
by John Adams
FYI, I am testing this on my local dev machine with a brand new database, and I am not able to get this message to appear. Though it appears 100% of the time for my "John" character in New Telon. It is my suspicion that it is existing Character data that might be causing the issue.

Task: Devs, can you think of any reason why in SaveCharacter, we'd end up with "error == true"? There are _no_ SQL errors in the console, and the only thing I can see offhand are the return(false) for varying reasons. Since there is no logging in the functions themselves, we cannot determine which Save* is doing it.

I strongly suggest moving Logging to your individual functions, with a Debug logger that you are starting to save ___ and finished saving ___ before returning false/true. This way also, SaveCharacter itself stays lightweight.

If no one gets to this change before the end of the year, I'll tackle it after the holidays. Logging is critical, please do not forget to place them logically and frequently.

Re: Failed to save your character. You should relog now.

Posted: Fri Dec 26, 2014 5:43 pm
by Blackstorm
Hi,

Could append if your character "John" has no entries into the table "character_attributes". Can you check that please ?

Re: Failed to save your character. You should relog now.

Posted: Thu Jan 01, 2015 5:20 pm
by John Adams
[quote="John Adams"]If no one gets to this change before the end of the year, I'll tackle it after the holidays. Logging is critical, please do not forget to place them logically and frequently.[/quote]
After fiddling with this for 30 mins or so, I think I am going to make a command decision on our excessive use of "bool" functions in World Database. I realize it's smart to check for errors and such, but I think we're going to be shooting ourselves in the foot if we check true/false on every single thing we do.... correct me if I'm wrong. I am normally the "err on the side of caution" guy, but we have things quitting when they have no reason to quit.

Going to submit my re-write of a few of these Save functions, you tell me what you think. Going to simplify a little.

Re: Failed to save your character. You should relog now.

Posted: Thu Jan 01, 2015 11:06 pm
by Lokked
This is happening (at least on my server) because the Attributes code is in place, but not implemented (the functions to load the attribute lists is never called), so when the SaveCharacter function runs, it fails during the portion where it is supposed to update attributes.

**Edit - I likely removed something I shouldn't have while writing in my rules. I took John's most recent commit and factored my changes into that, and attributes (and everything else) is loading properly. I don't get the Failed to Save anymore, even without John's addition.

I will commit my changes to these sections soon, but I'd like to test more. This commit has set up Dev Rules to allow processing for various non-critical systems, such as Attributes, Abilities, Combat, Inventory, Spawn Lists, Titles, Factions, pretty much anything that doesn't involve logging in, running around and logging out successfully. There is 1 rule for each of these sub-systems.