11.08.2016, 14:10
Hello guys, i made my command /admins and it has some errors.
Check
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : error 017: undefined symbol "PlayerInfo"
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : error 001: expected token: ";", but found "]"
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : error 029: invalid expression, assumed zero
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
I have the defines
#define Color_Trial_Moderator COLOR_WHITE //level 1
#define Color_Basic_Moderator COLOR_ORANGE //level 2
#define Color_Super_Moderator COLOR_YELLOW //level 3
#define Color_Administrator COLOR_GREEN //level 4
#define Color_Master_Administrator COLOR_BLUE //level 5
#define Color_Professional_Administrator COLOR_BLUE //level 6
#define Color_Delta_Administrator COLOR_RED //level 7
#define Color_Alfa_Administrator COLOR_RED //level 8
#define Color_Scripter COLOR_RED //level 9
#define Color_Corporate COLOR_RED //level 10
if (strcmp("/admins", cmdtext, true, 10) == 0)
{
new count = 0;
new string[128];
new AdmRank[128];
new AdmDuty[128];
new ChangeColor;
SendClientMessage(playerid, 0x008000FF, "_________________________________________________ ");
SendClientMessage(playerid, 0xFF0000FF, "_______________|- Online Admins -|__________________");
SendClientMessage(playerid, 0x008000FF, "_________________________________________________ ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0)
{
if(IsPlayerAdmin(i))
{
AdmRank = "Corporate";
ChangeColor = Color_Corporate;
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: {
AdmRank = "Trial_Administrator";
ChangeColor = Color_Trial_Administrator;
}
case 2: {
AdmRank = "Basic_Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 3: {
AdmRank = "Super_Moderator";
ChangeColor = Color_Super_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Master_Administrator";
ChangeColor = Color_Master_Administrator;
}
case 6: {
AdmRank = "Professional_Administrator";
ChangeColor = Color_Professional_Administrator;
}
case 7: {
AdmRank = "Delta_Administrator";
ChangeColor = Color_Delta_Administrator;
}
case 8: {
AdmRank = "Alfa_Administrator";
ChangeColor = Color_Alfa_Administrator;
}
case 9: {
AdmRank = "Scripter";
ChangeColor = Color_Scripter;
}
case 10: {
AdmRank = "Corporate";
ChangeColor = Color_Corporate;
}
}
}
switch(PlayerInfo[i][OnDuty])
{
case 0: AdmDuty = "Off Duty!";
case 1: AdmDuty = "On Duty!";
case 2: {
AdmRank = "On Duty!";
}
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s | %s",PlayerInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"_______________|- No Admins Online -|__________________");
SendClientMessage(playerid, red, "_________________________________________________ ");
return 1;
}
Please tell me what's wrong
Check
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : error 017: undefined symbol "PlayerInfo"
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : warning 215: expression has no effect
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : error 001: expected token: ";", but found "]"
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : error 029: invalid expression, assumed zero
C:\Users\ўггелпт\Desktop\samp037_svr_R2-1-1_win32\gamemodes\New3.pwn(1215) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
I have the defines
#define Color_Trial_Moderator COLOR_WHITE //level 1
#define Color_Basic_Moderator COLOR_ORANGE //level 2
#define Color_Super_Moderator COLOR_YELLOW //level 3
#define Color_Administrator COLOR_GREEN //level 4
#define Color_Master_Administrator COLOR_BLUE //level 5
#define Color_Professional_Administrator COLOR_BLUE //level 6
#define Color_Delta_Administrator COLOR_RED //level 7
#define Color_Alfa_Administrator COLOR_RED //level 8
#define Color_Scripter COLOR_RED //level 9
#define Color_Corporate COLOR_RED //level 10
if (strcmp("/admins", cmdtext, true, 10) == 0)
{
new count = 0;
new string[128];
new AdmRank[128];
new AdmDuty[128];
new ChangeColor;
SendClientMessage(playerid, 0x008000FF, "_________________________________________________ ");
SendClientMessage(playerid, 0xFF0000FF, "_______________|- Online Admins -|__________________");
SendClientMessage(playerid, 0x008000FF, "_________________________________________________ ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0)
{
if(IsPlayerAdmin(i))
{
AdmRank = "Corporate";
ChangeColor = Color_Corporate;
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: {
AdmRank = "Trial_Administrator";
ChangeColor = Color_Trial_Administrator;
}
case 2: {
AdmRank = "Basic_Moderator";
ChangeColor = Color_Basic_Moderator;
}
case 3: {
AdmRank = "Super_Moderator";
ChangeColor = Color_Super_Moderator;
}
case 4: {
AdmRank = "Administrator";
ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Master_Administrator";
ChangeColor = Color_Master_Administrator;
}
case 6: {
AdmRank = "Professional_Administrator";
ChangeColor = Color_Professional_Administrator;
}
case 7: {
AdmRank = "Delta_Administrator";
ChangeColor = Color_Delta_Administrator;
}
case 8: {
AdmRank = "Alfa_Administrator";
ChangeColor = Color_Alfa_Administrator;
}
case 9: {
AdmRank = "Scripter";
ChangeColor = Color_Scripter;
}
case 10: {
AdmRank = "Corporate";
ChangeColor = Color_Corporate;
}
}
}
switch(PlayerInfo[i][OnDuty])
{
case 0: AdmDuty = "Off Duty!";
case 1: AdmDuty = "On Duty!";
case 2: {
AdmRank = "On Duty!";
}
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s | %s",PlayerInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"_______________|- No Admins Online -|__________________");
SendClientMessage(playerid, red, "_________________________________________________ ");
return 1;
}
Please tell me what's wrong