22.12.2015, 21:54
Hey hey,
I got quite a lot of problems with my Server, one of the Commands is causing a crash:
This is the Command that is causing it:
Any ideas?
I got quite a lot of problems with my Server, one of the Commands is causing a crash:
Код:
[23:49:58] [debug] Server crashed while executing RobinMode.amx [23:49:58] [debug] AMX backtrace: [23:49:58] [debug] #0 00000073 in ?? () from RobinMode.amx [23:49:58] [debug] #1 00000073 in public cmd_asay () from RobinMode.amx [23:49:58] [debug] #2 native CallLocalFunction () from sampsvr-port_2470 [23:49:58] [debug] #3 000111dc in public KB_OnPlayerCommandText (0, 1433272) from RobinMode.amx [23:49:58] [debug] #4 00004dd0 in public OnPlayerCommandText (0, 1433272) from RobinMode.amx
PHP код:
COMMAND:asay(playerid, params[])
{
if(level[playerid] == 6)
{
new pid, towhat;
if(sscanf(params, "us", pid, towhat)) return SendClientMessage(playerid, COLOR_RED, "Usage: /asay [PlayerID] [Text]");
{
if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: That player is not online.");
new string[180];
format(string, sizeof(string), "%s", towhat);
SendPlayerMessageToAll(pid, string);
printf("%s",string);
}
}
else return 0;
return 1;
}