Posts: 253
Threads: 15
Joined: Jul 2006
Reputation:
0
My goodness. That is CRAZY.
OnPlayerUpdate is called about 20 times a SECOND. You are saving to that file too often.
This could be set up on a timer to execute every 60 seconds and would still be too much.
You are saving roughly 1,200 times a minute!!!
Posts: 321
Threads: 84
Joined: Apr 2008
Reputation:
0
LMAO, so how the fuck do I fix it? It's the la-rp script..? Is the la-rp scripter a retart? I know I needed to script from scratch but I can't script that good.
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
Don't use OnPlayerDisconnect, player crashes, doesn't always save! Use a TIMER! 3 second timer or 500 ms.
Posts: 321
Threads: 84
Joined: Apr 2008
Reputation:
0
I don't understand how to save that shit I ain't that good tho.. But it never gave me any problems, the onplayerupdate and shit.. Can that be why the objects aren't loading? Because that's the main problem I will fix the other things but it was working w/e is the onplayerupdate seconds. It always worked and now it ain't. That's my problem. So does the onplayerupdate can make the objects disappear?
Posts: 1,494
Threads: 120
Joined: Dec 2009
Reputation:
0
Well yeah, player crash, server crash them its kinda could be fucked.
Double post oops
Posts: 2,896
Threads: 11
Joined: Sep 2008
Reputation:
0
It would be just as good saving under OnPlayerDisconnect then in a timer. The chances of your server crashing, unless your script is crash (which it shouldn't be on a server anyway), are very slim. With saving at the time the player disconnects is the best option, unless you are TRULY that worried about keeping everyone's stats perfect.
Posts: 253
Threads: 15
Joined: Jul 2006
Reputation:
0
willsuckformoney, your code is VERY inefficient.
You should only save when a player does something that needs to be saved. Why would you save the SAME INFORMATION every 5 seconds? It's just utterly stupid.
On my server, we save kills and deaths, so the only time I need to worry is OnPlayerDeath. Why would I save the stat of kills/deaths on a timer? It only matters when a player dies.