16.04.2014, 21:19
Hello. When I updated my server to 0.3z RC5
I got an error on this code. I can't seem to find the problem. What causes it?
Errors:
I got an error on this code. I can't seem to find the problem. What causes it?
Errors:
Код:
warning 225: unreachable code warning 217: loose indentation error 029: invalid expression, assumed zero error 017: undefined symbol "cmd_pm" error 029: invalid expression, assumed zero fatal error 107: too many error messages on one line
PHP код:
CMD:pm(playerid, params[])
{
new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, str2))
{
SendClientMessage(playerid, 0xFFFF00C8, "Usage: /pm <id> <message>");
return 1;
}
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFFFF00C8, "ERROR: Player not connected");
if(playerid == id) return SendClientMessage(playerid, 0xFFFF00C8, "ERROR: You cannot pm yourself!");
{
GetPlayerName(playerid, Name1, sizeof(Name1));
GetPlayerName(id, Name2, sizeof(Name2));
format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
SendClientMessage(playerid, 0xFFFF00C8, str);
format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
SendClientMessage(id, 0xFFFF00C8, str);
}
return 1;
}