Timers.
#1

Settimer and SettimerEx, if used often will it lead somehow to a server crash? is it the same like having too much scripts on callback "onplayerupdate" ?, because i'am currently working on a auto-save system that saves your stats to mysql without losing it on a server restart or crash.
Reply
#2

If you're worried about people losing their stats due to a crash or restart, save a player's stats when they actually change rather than making a timer to have it save every 5 minutes.
Reply
#3

Quote:
Originally Posted by DTV
View Post
If you're worried about people losing their stats due to a crash or restart, save a player's stats when they actually change rather than making a timer to have it save every 5 minutes.
exactly,why would you auto-save its stats every 1 minute or so.Imagine having 1000/1000 players. Just update them when stats that matter are modified(money,level etc )
Reply
#4

If the timer is used badly, and structured so it makes the script stall, then it will cause problems.

Doesn't matter how often you fire the timer, it's about its efficiency.
Reply
#5

Thanks, i've got a clear point now
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)