11.07.2014, 17:02
Hi, I have a problem with this code
it gives me these errors
The 362nd line:
I've already defined Suicide(playerid) with new Suicide[MAX_PLAYERS];
Please help me, what is the problem?
pawn Код:
CMD:kill(playerid, params[])
{
if(Suicide(playerid) == 0) // Check if the player has comitted suicide recently
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, RED, "You committed suicide! Please don't abuse it or else you'll get kicked.");
SetTimer(playerid, "SuicideTimer", 20000, false);
Suicide(playerid) = 1;
}
else
{
SendClientMessage(playerid, RED, "You have to wait before committing suicide again.");
}
return 1;
Код:
C:\Users\Cretu\Desktop\Fri's TDM\gamemodes\fritdm.pwn(362) : error 012: invalid function call, not a valid address C:\Users\Cretu\Desktop\Fri's TDM\gamemodes\fritdm.pwn(362) : warning 215: expression has no effect C:\Users\Cretu\Desktop\Fri's TDM\gamemodes\fritdm.pwn(362) : error 001: expected token: ";", but found ")" C:\Users\Cretu\Desktop\Fri's TDM\gamemodes\fritdm.pwn(362) : error 029: invalid expression, assumed zero C:\Users\Cretu\Desktop\Fri's TDM\gamemodes\fritdm.pwn(362) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Код:
if(Suicide(playerid) == 0) // Check if the player has comitted suicide recently
Please help me, what is the problem?