26.10.2013, 12:54
PHP код:
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20786) : error 022: must be lvalue (non-constant)
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20786) : error 036: empty statement
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20787) : error 014: invalid statement; not in switch
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20787) : warning 215: expression has no effect
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20787) : error 001: expected token: ";", but found ":"
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20787) : error 029: invalid expression, assumed zero
C:\Documents and Settings\PhongLan\Desktop\New Folder (8)\gamemodes\SATDM_v14.pwn(20787) : fatal error 107: too many error messages on one line
pawn Код:
CMD:vadmins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
new ChangeColor;
SendClientMessage(playerid, green, " ");
SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
SendClientMessage(playerid, green, " ");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0)
{
if(PlayerInfo[i][Level] > 5)
{
AdmRank = "Professional Admin";
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: {
AdmRank = "Basic Moderator";
}
case 2: {
AdmRank = "Moderator";
}
case 3: {
AdmRank = "Master Moderator";
}
case 4: {
AdmRank = "Administrator";
}
case 5: {
AdmRank = "Master Administrator";
}
}
}
switch(PlayerInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",PlayerInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
SendClientMessage(playerid, green, string);
count++;
}
}
}
if (count == 0)
SendClientMessage(playerid,red,"No admin online in the list");
SendClientMessage(playerid, green, " _______________________________________");
return 1;
}
PHP код:
switch(PlayerInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}