26 errors, weird...
#1

Код:
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(901) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(903) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(905) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(912) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(914) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(916) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(918) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(923) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(925) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(926) : warning 202: number of arguments does not match definition
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(926) : warning 202: number of arguments does not match definition
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(933) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(935) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(937) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(939) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(944) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(946) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(947) : warning 202: number of arguments does not match definition
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(947) : warning 202: number of arguments does not match definition
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(954) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(956) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(958) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(960) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(965) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(967) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(968) : warning 202: number of arguments does not match definition
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(968) : warning 202: number of arguments does not match definition
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(975) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(977) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(979) : error 035: argument type mismatch (argument 1)
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(981) : error 033: array must be indexed (variable "pID")
C:\Users\iMarkx\Desktop\Future Freedom\gamemodes\CODMW3.pwn(986) : error 035: argument type mismatch (argument 1)

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


26 Errors.
Just started a new gamemode and did this command and boom, got 26 errors... I give up, cant solve them :S

Script:

pawn Код:
CMD:setadminlevel(playerid,params[])
{
    new pID[MAX_PLAYERS], Level, string[128];
    if(PlayerInfo[playerid][pLevel] == 6 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "ud", pID, Level))
        {
            if(Level >= 7)
            {
                switch(Level)
                {
                    case 0:
                    {
                        if(PlayerInfo[pID][pLevel] >= 1) //901
                        {
                            format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 0!", pName(playerid), playerid, pName(pID), pID); //903
                            SendClientMessageToAll(0xDEEE20FF, string);
                            PlayerInfo[pID][pLevel] = 0; //905
                            GameTextForPlayer(playerid, "~r~Demoted!", 3000, 5);
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 0!");
                    }
                    case 1:
                    {
                        if(PlayerInfo[pID][pLevel] == 1) //912
                        {
                            if(PlayerInfo[pID][pLevel] >= 2) //914
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 1!", pName(playerid), playerid, pName(pID), pID); //916
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1; //918
                                GameTextForPlayer(playerid, "~r~Demoted!", 3000, 5);
                            }
                            else
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 1!", pName(playerid), playerid, pName(pID), pID); //923 and so on...
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~g~Promoted!, 3000, 5");
                            }
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 1!");
                    }
                    case 2:
                    {
                        if(PlayerInfo[pID][pLevel] == 2)
                        {
                            if(PlayerInfo[pID][pLevel] >= 3)
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 2!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~r~Demoted!", 3000, 5);
                            }
                            else
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 2!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~g~Promoted!, 3000, 5");
                            }
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 2!");
                    }
                    case 3:
                    {
                        if(PlayerInfo[pID][pLevel] == 3)
                        {
                            if(PlayerInfo[pID][pLevel] >= 4)
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 3!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~r~Demoted!", 3000, 5);
                            }
                            else
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 3!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~g~Promoted!, 3000, 5");
                            }
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 3!");
                    }
                    case 4:
                    {
                        if(PlayerInfo[pID][pLevel] == 4)
                        {
                            if(PlayerInfo[pID][pLevel] >= 5)
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 4!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~r~Demoted!", 3000, 5);
                            }
                            else
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 4!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, 7, "~g~Promoted!");
                            }
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 4!");
                    }
                    case 5:
                    {
                        if(PlayerInfo[pID][pLevel] == 5)
                        {
                            if(PlayerInfo[pID][pLevel] >= 6)
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 5!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, "~r~Demoted!", 3000, 5);
                            }
                            else
                            {
                                format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 5!", pName(playerid), playerid, pName(pID), pID);
                                SendClientMessageToAll(-1, string);
                                PlayerInfo[pID][pLevel] = 1;
                                GameTextForPlayer(playerid, 7, "~g~Promoted!");
                            }
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 5!");
                    }
                    case 6:
                    {
                        if(PlayerInfo[pID][pLevel] == 6)
                        {
                            format(string, sizeof string, ""Green"[System] "White"Administrator %s(%d) has set %s(%d) admin level to 1!", pName(playerid), playerid, pName(pID), pID);
                            SendClientMessageToAll(-1, string);
                            PlayerInfo[pID][pLevel] = 1;
                            GameTextForPlayer(playerid, 7, "~g~Promoted!");
                        }
                        else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Player is alredy level 6!");
                    }
                }
                else return SendClientMessage(playerid, -1, ""Red"[Error] "White"Please enter a vaild level! 0 - 6");
            }
            else return ErrorMessage(playerid, "Usage: /(s)et(a)dmin(l)evel [playerid] [level]");
        }
        else return AdminError(playerid);
    }
    return 1;
}
Reply
#2

Change...
pawn Код:
new pID[MAX_PLAYERS];
To..
pawn Код:
new pID;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)