PDA

View Full Version : Server crashes


StrikerZ
25/11/2016, 12:26 PM
Hi i'm currently working on a include. So i hooked the callbacks but the server crashes while calling it.[03:33:43] [debug] #100 000013e0 in public OnPlayerUpdate (0) from grandlarc.amx
[03:33:43] [debug] Server crashed while executing grandlarc.amx

This is how i hooked this #if defined _ALS_OnPlayerUpdate
#undef OnPlayerUpdate
#else
#define _ALS_OnPlayerUpdate
#endif

#define OnPlayerUpdate OnPlayerUpdateEx
forward OnPlayerUpdateEx(playerid);

StrikerZ
25/11/2016, 01:02 PM
Anyone?

StrikerZ
25/11/2016, 01:51 PM
No one here to help today?

Konstantinos
25/11/2016, 02:07 PM
http://forum.sa-mp.com/announcement.php?f=12

Read the above and then compile with debug info (https://github.com/Zeex/samp-plugin-crashdetect/wiki/Compiling-scripts-with-debug-info). This will give a more detailed log with lines.

Looking at #100, seems more like a recursion so something with the hook went wrong? Post the whole code.

StrikerZ
25/11/2016, 02:12 PM
public OnPlayerUpdate(playerid)
{
if(GetPlayerSpecialActionEx(playerid) == SPECIAL_ACTION_DRINK_SPRUNK)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health == 100)
{
SetPlayerHealthEx(playerid,99); // to avoid being detected as a hacker when we use sprunk to refill health
}
}
CallLocalFunction("OnPlayerUpdateEx", "i", playerid);

return 1;
}
#if defined _ALS_OnPlayerUpdate
#undef OnPlayerUpdate
#else
#define _ALS_OnPlayerUpdate
#endif

#define OnPlayerUpdate OnPlayerUpdateEx The callback from the include which im making. The debug [05:23:04] [debug] #0 00001890 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:266
[05:23:04] [debug] #1 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #2 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #3 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #4 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #5 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #6 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #7 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #8 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #9 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #10 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #11 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #12 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #13 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #14 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #15 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #16 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #17 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #18 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #19 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #20 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #21 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #22 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #23 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #24 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #25 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #26 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #27 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #28 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #29 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #30 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #31 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #32 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #33 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #34 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #35 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #36 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #37 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #38 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #39 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #40 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #41 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #42 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #43 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #44 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #45 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #46 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #47 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #48 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #49 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #50 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #51 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #52 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #53 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #54 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #55 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #56 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #57 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #58 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #59 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #60 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #61 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #62 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #63 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #64 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #65 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #66 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #67 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #68 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #69 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #70 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #71 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #72 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #73 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #74 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #75 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #76 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #77 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #78 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #79 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #80 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #81 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #82 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #83 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #84 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #85 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #86 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #87 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #88 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #89 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #90 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #91 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #92 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #93 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #94 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #95 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #96 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #97 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #98 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #99 000018b8 in GetPlayerSpecialActionEx (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] #100 000018b8 in public OnPlayerUpdate (playerid=0) at D:\Softwares\samp037_svr_R2-1-1_win32ffff\pawno\include\Anti-Cheat.inc:272
[05:23:04] [debug] Server crashed while executing grandlarc.amx

Konstantinos
25/11/2016, 02:16 PM
It was indeed recursion but not with OnPlayerUpdate. GetPlayerSpecialActionEx calls itself instead of GetPlayerSpecialAction.

StrikerZ
25/11/2016, 02:19 PM
#if defined _ALS_GetPlayerSpecialAction
#undef GetPlayerSpecialAction
#else
#define _ALS_GetPlayerSpecialAction
#endif

#define GetPlayerSpecialAction GetPlayerSpecialActionEx
I also use this.

Konstantinos
25/11/2016, 02:22 PM
This is not what I mean, GetPlayerSpecialActionEx literally calls GetPlayerSpecialActionEx back instead of GetPlayerSpecialAction function.

EDIT: And there is a better hook method for callbacks to avoid CallLocalFunction, take a look at an example: http://forum.sa-mp.com/showpost.php?p=3803273&postcount=3539

StrikerZ
25/11/2016, 02:23 PM
This is not what I mean, GetPlayerSpecialActionEx literally calls GetPlayerSpecialActionEx back instead of GetPlayerSpecialAction function.
Hm.. then any idea what i'm missing or doing mistake in anything?

Konstantinos
25/11/2016, 02:28 PM
Hm.. then any idea what i'm missing or doing mistake in anything?

I told you twice what you're doing wrong.


// WRONG:
stock GetPlayerSpecialActionEx(playerid)
{
// code..
return GetPlayerSpecialActionEx(playerid);
}


GetPlayerSpecialActionEx calls GetPlayerSpecialActionEx which calls GetPlayerSpecialActionEx which calls GetPlayerSpecialActionEx ... infinite (not really, until the server crash).

// CORRECT:
stock GetPlayerSpecialActionEx(playerid)
{
// code..
return GetPlayerSpecialAction(playerid);
}

StrikerZ
25/11/2016, 02:33 PM
I was already having this and its the same as yours but still same issue with same errorGetPlayerSpecialActionEx(playerid)
{
return GetPlayerSpecialAction(playerid);
}

Konstantinos
25/11/2016, 02:40 PM
As the logs reports, there is recursion with GetPlayerSpecialActionEx and it is the wrong way I posted above. If you haven't edited the include, what are the lines 266 and 272 from Anti-Cheat.inc file?

StrikerZ
25/11/2016, 02:55 PM
SendToAdmin(color,Message[])
{
for(new i = 0,j = GetPlayerPoolSize();i <= j;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i,color,Message);
}
}
}
return 1;//266
}

GetPlayerSpecialActionEx(playerid)
{
return GetPlayerSpecialAction(playerid);//272
}

StrikerZ
26/11/2016, 12:39 AM
Bump