04.06.2016, 23:30
This is my /hgmembers command code >
And this is my /sethg command code >
And I found this error >
Please someone help me
PHP код:
CMD:hgmembers(playerid, params[])
{
SendClientMessage(playerid, lightblue, " ");
SendClientMessage(playerid, lightblue, "___________ |- Online [HG] Clan Members -| ___________");
SendClientMessage(playerid, lightblue, " ");
new count = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(!PlayerInfo[i][Rank]) continue;
new string[90], playersname[MAX_PLAYER_NAME];
GetPlayerName(i, playersname, sizeof(playersname));
switch(PlayerInfo[i][Rank])
{
case 1: format(string, sizeof(string), "{33AA33}Rank: %d - %s (ID:%i) | Newbie", PlayerInfo[i][Rank], playersname, i);
case 2: format(string, sizeof(string), "{33AA33}Rank: %d - %s (ID:%i) | Old Member", PlayerInfo[i][Rank], playersname, i);
case 3: format(string, sizeof(string), "{FFFF00}Rank: %d - %s (ID:%i) | Super Member", PlayerInfo[i][Rank], playersname, i);
case 4: format(string, sizeof(string), "{000000}Rank: %d - %s (ID:%i) | Professional Member", PlayerInfo[i][Rank], playersname, i);
case 5: format(string, sizeof(string), "{33CCFF}Rank: %d - %s (ID:%i) | Master Member", PlayerInfo[i][Rank], playersname, i);
case 6: format(string, sizeof(string), "{C0C0C0}Rank: %d - %s (ID:%i) | Elite Member", PlayerInfo[i][Rank], playersname, i);
case 7: format(string, sizeof(string), "{FF0000}Rank: %d - %s (ID:%i) | Co-Leader", PlayerInfo[i][Rank], playersname, i);
case 8: format(string, sizeof(string), "{FF0000}Rank: %d - %s (ID:%i) | Leader", PlayerInfo[i][Rank], playersname, i);
case 9: format(string, sizeof(string), "{FF9900}Rank: %d - %s (ID:%i) | Manager", PlayerInfo[i][Rank], playersname, i);
case 10: format(string, sizeof(string), "{AA3333}Rank: %d - %s (ID:%i) | Founder", PlayerInfo[i][Rank], playersname, i);
default: continue;
}
SendClientMessage(playerid, red, string);
count++;
}
if(!count) SendClientMessage(playerid, lightblue, "No [HG] Clan Members online in the list");
SendClientMessage(playerid, lightblue, "___________________________________________________");
return 1;
}
PHP код:
CMD:sethg(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Rank] >= 7 || IsPlayerAdmin(playerid)) {
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /sethg [playerid] [Rank]");
new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(isnull(tmp2)) return SendClientMessage(playerid, red, "USAGE: /sethg [playerid] [Rank]");
level = strval(tmp2);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
if(PlayerInfo[player1][LoggedIn] == 1) {
if(level > ServerInfo[MaxHGRank] ) return SendClientMessage(playerid,red,"ERROR: Incorrect Rank");
if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,"ERROR: Player is already this Rank");
CMDMessageToAdmins(playerid,"SETHG");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
if(level > 0) format(string,sizeof(string),"Administrator %s has set you to [HG] Member Status [Rank %d]",adminname, level);
else format(string,sizeof(string),"Administrator %s has set you to Player Status [level %d]",adminname, level);
SendClientMessage(player1,blue,string);
if(level > PlayerInfo[player1][Level]) GameTextForPlayer(player1,"HG Rank Promoted", 2000, 3);
else GameTextForPlayer(player1,"HG Rank Demoted", 2000, 3);
format(string,sizeof(string),"You have made %s [HG] Rank %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
dUserSetINT(PlayerName2(player1)).("level",(level));
PlayerInfo[player1][Rank] = level;
return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
} else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be [HG] Member");
} else return SendClientMessage(playerid, red, "Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
Код HTML:
F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31264) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31267) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31269) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31270) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31271) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31272) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31273) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31274) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31275) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31276) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31277) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31278) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31386) : error 017: undefined symbol "Rank" F:\GAME\SA-MP Server\HGTDM\Gamemodes\BBTDM~RP.pwn(31411) : error 017: undefined symbol "Rank" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 14 Errors.