enum PlayerInfo
{
Pass[129],
Adminlevel,
VIPlevel,
Money,
Scores,
Kills,
Deaths
}
new pInfo[MAX_PLAYERS][PlayerInfo];
CMD:skin(playerid, params[])
{
new string[128], skinid;
if (pInfo[playerid][VIPLevel] >= 1)
{
if(sscanf(params, "d", skinid)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /skin [skinID]");
}
else
{
SetPlayerSkin(playerid, skinid);
format(string, sizeof(string), "You have set your skin ID to %d", skinid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
SendClientMessage(playerid, COLOR_GOLD, "Only Donators can use this command!");
}
}
return 1;
}
C:\Program Files (x86)\GTA San Andreas\SAMP\SA-MP Server\gamemodes\rdm.pwn(202) : error 017: undefined symbol "VIPLevel" C:\Program Files (x86)\GTA San Andreas\SAMP\SA-MP Server\gamemodes\rdm.pwn(205) : error 001: expected token: ")", but found "{" C:\Program Files (x86)\GTA San Andreas\SAMP\SA-MP Server\gamemodes\rdm.pwn(214) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Errors.
Variables are case sensitive, you've named/used them inconsistently. VIPlevel or VIPLevel?
if(sscanf(params, "d", skinid) should have 2 closing brackets. |
C:\Program Files (x86)\GTA San Andreas\SAMP\SA-MP Server\gamemodes\rdm.pwn(214) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
CMD:skin(playerid, params[])
{
if (pInfo[playerid][VIPlevel] < 1) return SendClientMessage(playerid, COLOR_GOLD, "Only Donators can use this command!");
new skinid;
if(sscanf(params, "d", skinid)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /skin [skinID]");
SetPlayerSkin(playerid, skinid);
new string[33];
format(string, sizeof(string), "You have set your skin ID to %d", skinid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
And you also forgot to close a bracket and use the "else" statement for the VIP level. It was like using "else" twice in a row.
pawn Код:
|