27.02.2013, 21:51
So, I have this code written in my gamemode
When I compile, I get the following error
What am I doing wrong?
Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
CMD:am(playerid, params[]
{
if(IsPlayerAdmin(playerid)){
new string[128];
if(isnull(params)) return SendClientMessage(playerid, -1, "USAGE: /am [message]");
format(string, sizeof(string), "%s", params);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
return 1;
} else {
SendClientMessage(COLOR_LIGHTBLUE, "You don't have access to this command.");
}
}
return 1;
}
Код:
F:\SAMP\gamemodes\naterp.pwn(220) : error 017: undefined symbol "am" F:\SAMP\gamemodes\naterp.pwn(221) : warning 217: loose indentation F:\SAMP\gamemodes\naterp.pwn(224) : error 017: undefined symbol "params" F:\SAMP\gamemodes\naterp.pwn(224) : error 029: invalid expression, assumed zero F:\SAMP\gamemodes\naterp.pwn(224) : error 017: undefined symbol "params" F:\SAMP\gamemodes\naterp.pwn(224) : fatal error 107: too many error messages on one line

