server crash while executing - 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: server crash while executing (
/showthread.php?tid=621245)
server crash while executing -
Mahesh90901 - 08.11.2016
Код:
[46:07:18] [debug] AMX backtrace:
[46:07:18] [debug] #0 native CallLocalFunction () from samp-server.exe
[46:07:18] [debug] #1 00002720 in ?? (107, 100, 32, 59, 108, 97, 115, 100, 107, 32, ... <18 arguments>) from sam-rp.amx
[46:07:18] [debug] #2 00000061 in public OnPlayerCommandText () from sam-rp.amx
[46:07:18] [debug] Native backtrace:
can anyone help me fix this
Re: server crash while executing -
StrikerZ - 08.11.2016
Show OnPlayerCommandText
Re: server crash while executing -
Mahesh90901 - 08.11.2016
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (zcmd_g_HasOPCS && !CallLocalFunction("OnPlayerCommandReceived", "is", playerid, cmdtext))
{
return 1;
}
new
pos,
funcname[MAX_FUNC_NAME];
while (cmdtext[++pos] > ' ')
{
funcname[pos-1] = tolower(cmdtext[pos]);
}
format(funcname, sizeof(funcname), "cmd_%s", funcname);
while (cmdtext[pos] == ' ') pos++;
if (!cmdtext[pos])
{
cmdtext[--pos] = '\1';
}
if (zcmd_g_HasOPCE)
{
return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, cmdtext[pos]));
}
return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]);
}