Why these errors - Weird
#1

Код:
CMD:setskin(playerid, params[])
{
	new id, skin, string[128];
(2075)	if(PlayerInfo[playerid][pAdmin] > 3)else SendClientMessage(playerid, COLOR_WHITE, "Niste ovlasteni");
(2076)	else if(sscanf(params, "ui", id, skin))else SendClientMessage(playerid, COLOR_WHITE, "/setskin [ID/Ime igraca] [Skin]");
	else if(id == INVALID_PLAYER_ID) else SendClientMessage(playerid, COLOR_WHITE, "Pogresan ID");
	else if(skin < 0 && skin > 73 || skin < 75 && skin > 299)else SendClientMessage(playerid, COLOR_GREEN, "Skin nije valjan!");
	SetPlayerSkin(id, skin);
	PlayerInfo[playerid][Skin] = skin;
	format(string, sizeof(string), "Stavio si igracu %s, skin ID: %d", PlayerName(id), skin);
	SendClientMessage(playerid, -1, string);
	format(string, sizeof(string), "Admin %s, ti je dao skin ID: %d", PlayerName(playerid), skin);
	SendClientMessage(id, COLOR_LIGHTBLUE, string);
	return 1;
}
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2075) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2076) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2076) : warning 215: expression has no effect
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2076) : error 001: expected token: ";", but found "if"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2076) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2076) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#2

pawn Код:
CMD:setskin(playerid, params[])
{
    new id, skin, string[128];
        if(PlayerInfo[playerid][pAdmin] < 3) SendClientMessage(playerid, COLOR_WHITE, "Niste ovlasteni");
            else if(sscanf(params, "ui", id, skin)) SendClientMessage(playerid, COLOR_WHITE, "/setskin [ID/Ime igraca] [Skin]");
    else if(id == INVALID_PLAYER_ID) else SendClientMessage(playerid, COLOR_WHITE, "Pogresan ID");
    else if(skin < 0 && skin > 73 || skin < 75 && skin > 299)else SendClientMessage(playerid, COLOR_GREEN, "Skin nije valjan!");
    SetPlayerSkin(id, skin);
    PlayerInfo[playerid][Skin] = skin;
    format(string, sizeof(string), "Stavio si igracu %s, skin ID: %d", PlayerName(id), skin);
    SendClientMessage(playerid, -1, string);
    format(string, sizeof(string), "Admin %s, ti je dao skin ID: %d", PlayerName(playerid), skin);
    SendClientMessage(id, COLOR_LIGHTBLUE, string);
    return 1;
}
Reply
#3

same:

Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2077) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2078) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2078) : warning 215: expression has no effect
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2078) : error 001: expected token: ";", but found "if"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2078) : error 029: invalid expression, assumed zero
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(2078) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#4

i resolved errors:
i switch all there lines
Код:
if(PlayerInfo[playerid][pAdmin] > 3)else
with this
Код:
if(PlayerInfo[playerid][pAdmin] < 3)return
i hope i did right!?
Reply
#5

Here:
pawn Код:
CMD:setskin(playerid, params[])
{
    new id, skin, string[128];
    if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, -1, ""COL_GRAY"SERVER: "COLOR_WHITE"Niste ovlasteni");
    else if(sscanf(params, "ui", id, skin)) return SendClientMessage(playerid, -1, ""COL_GRAY"SERVER: "COLOR_WHITE"/setskin [ID/Ime igraca] [Skin]");
    else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""COL_GRAY"SERVER: "COLOR_WHITE"Pogresan ID");
    else if(skin < 0 && skin > 73 || skin < 75 && skin > 299) return SendClientMessage(playerid, -1, ""COLOR_WHITE"SERVER: "COL_WHITE"Skin nije valjan!");
    SetPlayerSkin(id, skin);
    PlayerInfo[playerid][Skin] = skin;
    format(string, sizeof(string), "Stavio si igracu %s, skin ID: %d", PlayerName(id), skin);
    SendClientMessage(playerid, -1, string);
    format(string, sizeof(string), "Admin %s, ti je dao skin ID: %d", PlayerName(playerid), skin);
    SendClientMessage(id, COLOR_LIGHTBLUE, string);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)