OnPlayerText doesnt work/crashes server.
#1

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[]);
Reply
#2

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.
Reply
#3

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?
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)