View Full Version : Lag

09/05/2014, 09:49 AM
Hello there, when someone register or login into my server, my server is lagging, am not sue that is a lag, i think it's something that freeze the server for 5 seconds, no one can talk on chat and you can see this AFK icon on all the players names. I don't know why this lag/freeze happens, well, here is what am getting from the server console when someone register/login.

[07:56:36] [debug] Run time error 4: "Array index out of bounds"
[07:56:36] [debug] Accessing element at index 999 past array upper bound 500
[07:56:36] [debug] Backtrace (most recent call first):
[07:56:36] [debug] #0 000653cc in OnPlayerStateChange () from RGRPc.amx

09/05/2014, 09:51 AM
mind showing us your code from OnPlayerStateChange in the gamemode RGRPc.amx?

09/05/2014, 09:52 AM
The run time error is caused at OnPlayerStateChange and it has nothing to do with the register/login system. For more information about it, you can get by compiling with -d3: https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info

The lag can be caused by bad coding and slow systems for saving/loading data.