Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-07-2008, 04:32 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
NPC DB not saving on disconnect. Alternative?

When the npcserver crashes or is disconnected by evil people with RC's, the variables in the database npcs are rolled back to some arbitrary past date. As such, a lot of information is being lost.

To reiterate: Information as money in banks, members in guilds, etc etc... Are being reset to the previous value (and thus, duping can occur) when the NPC Server crashes or is forcefully restarted.

I was wondering if this is a bug... And what is the best procedure to go forward with this?

Thanks
Reply With Quote
  #2  
Old 12-07-2008, 04:40 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Wow this suck o_O !
Reply With Quote
  #3  
Old 12-07-2008, 04:40 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Can always only use database NPC's as cache, and store the actual information in files. Upon a server crash, the DB simply reloads the information stored in those files.


http://forums.graalonline.com/forums...ad.php?t=81961

Check functions_cached_database.txt if you want an awesome system for it.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #4  
Old 12-07-2008, 06:16 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
If the npc is inactive or doesn't have a script, remember to wake it up when you add or modify data: a simple trigger("update", "") or similar will solve the problem.

Inactive npcs are not saved. It's the same problem when changing x or y of an inactive npc, you need to activate the npc so that the modifications are sent to the players.
Reply With Quote
  #5  
Old 12-08-2008, 01:07 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Hrm... In this case, there was scripts in the database npc (it managed the database), but it was on a reactionary bases (via function calls).

I'll just add a trigger after setting functions!

Thanks by the way (this bug wasn't an easy find!)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.