SA-MP Forums Archive
Lag - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Lag (/showthread.php?tid=512144)



Lag - TheSnaKe - 09.05.2014

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



Re: Lag - Smileys - 09.05.2014

mind showing us your code from OnPlayerStateChange in the gamemode RGRPc.amx?


Re: Lag - Konstantinos - 09.05.2014

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-...ith-debug-info

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