13.09.2013, 18:15
Greetings sa-mp
Today I was doing this simple script and I can not find where is teh error, I was looking for it but I can not find, take a look:
And I get this errors:
LINES:
If anyone can help me.
Regards,
Pablo.
Today I was doing this simple script and I can not find where is teh error, I was looking for it but I can not find, take a look:
pawn Код:
//==============================================================================
new OnDuty[MAX_PLAYERS];
CMD:aduty(playerid, params[])
{
if(gPlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "SERVER: You are not allowed to use this command");
{
new id, string[128];
if(sscanf(params, "us[128]", id, string))
SetPlayerColor(playerid, 0x00FFFF);
SetPlayerSkin(playerid, 217);
SetPlayerHealth(playerid, 0x7F800000);
format(string, sizeof(string), "ADMIN DUTY: %s is now on duty", GetName(id))
SendClientMessageToAll(0xFE2E2E, string);
}
return 1;
}
CMD:adutyoff(playerid, params[])
{
if(gPlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "SERVER: You are not allowed to use this command");
{
new id, string[128];
if(sscanf(params, "us[128]", id, string))
format(string, sizeof(string), "ADMIN DUTY: %s is now off duty", GetName(id))
SendClientMessageToAll(0xFE2E2E, string);
SetPlayerHealth(playerid, 0.0);
ForceClassSelection(playerid);
SetPlayerColor(playerid, -1);
SendClientMessage(playerid, -1, "{FE2E2E}DUTY: Now you are off duty, but you must keep doing it");
}
if(OnDuty[playerid] == 0)
{
SendClientMessage(playerid, -1, "{FE2E2E}ERROR: You are not on duty mode");
}
return 1;
}
pawn Код:
C:\Users\usuario\Sa-Mp\filterscripts\Commands.pwn(518) : error 001: expected token: ";", but found "-identifier-"
C:\Users\usuario\Sa-Mp\filterscripts\Commands.pwn(531) : error 001: expected token: ";", but found "-identifier-"
pawn Код:
SendClientMessageToAll(0xFE2E2E, string);
SendClientMessageToAll(0xFE2E2E, string);
Regards,
Pablo.