OnPlayerText doesnt work/crashes server. - 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: OnPlayerText doesnt work/crashes server. (
/showthread.php?tid=459799)
OnPlayerText doesnt work/crashes server. -
xXitsgodzillaXx - 24.08.2013
Okay so In a previous thread I had made it was talking about a certain command crashing the server but I narrowed it down to being a glitch with "OnPlayerText" okay soo, when I have the callback in my script it just crashes the server and I used crash detect and this is what i got.
Quote:
[15:36:21] [debug] Server crashed while executing DDPTDM.amx
[15:36:21] [debug] AMX backtrace:
[15:36:21] [debug] #0 native CallLocalFunction () [00471e90] from samp-server.exe
[15:36:21] [debug] #1 00006634 in public OnPlayerText (0x00000000, 0x0011cf24) from DDPTDM.amx
[15:36:22] [debug] Native backtrace:
[15:36:22] [debug] #0 0047215c in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\samp-server.exe
[15:36:22] [debug] #1 004010b6 in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\samp-server.exe
[15:36:22] [debug] #2 00be60ba in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\plugins\crashdetect.dll
[15:36:22] [debug] #3 00be7fee in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\plugins\crashdetect.dll
[15:36:22] [debug] #4 00be0091 in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\plugins\crashdetect.dll
[15:36:23] [debug] #5 00be610a in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\plugins\crashdetect.dll
[15:36:23] [debug] #6 0046cb12 in ?? () from C:\Documents and Settings\Owner\Desktop\DDPUSI TDM\samp-server.exe
|
and when I remove it players can not chat what so ever. (unless if they use /r which is their teams radio but it is a command so it doesnt do much with the callback.) Any ideas?
here is a "call local function" in gLibrary which is an include that i use. potentially the issue?
pawn Код:
public OnPlayerText(playerid, text[])
{
if(GetPVarInt(playerid,"muted") == 1)
{
SendClientMessage(playerid,0xFF0A00FF,"You cannot speak when muted.");
return 0;
}
return CallLocalFunction("gOnPlayerText","ss",playerid,text);
}
#if defined _ALS_OnPlayerText
#undef OnPlayerText
#else
#define _ALS_OnPlayerText
#endif
#define OnPlayerText gOnPlayerText
forward gOnPlayerText(playerid,text[]);
Re: OnPlayerText doesnt work/crashes server. -
Konstantinos - 24.08.2013
Why did you create another thread? Your previous one was about OnPlayerText crashes your server, so basically same to this one.
Like someone replied to the previous one, compile with debug mode in case it gives more informations/details.
You can also debug the callback and see where the code stops.
Re: OnPlayerText doesnt work/crashes server. -
xXitsgodzillaXx - 24.08.2013
How might I compile in debug mode?
Edit: okay wait I think I have it thats where you compile with the pawn.cfg right and it has this in it? "-O2 -d0 -r"
Should I post the XML doc that it compiled?
Re: OnPlayerText doesnt work/crashes server. -
Jefff - 24.08.2013
pawn Код:
return CallLocalFunction("gOnPlayerText","is",playerid,text); // playerid is a integer
and -d3 in pawn.cfg but here you dont need to check ;p its here
pawn Код:
[15:36:21] [debug] #0 native CallLocalFunction () [00471e90] from samp-server.exe