A bunch of erros
#1

Hi guys,i wanted to add a new command on my gamemode at the end of it and i get some errors and i don't know how to edit them to make them working.

The command i wanted to add :

pawn Код:
//=============================================================================================================================================================
// = Comanda: /agivelicenses
//=============================================================================================================================================================
    if(strcmp(cmd, "/agivelicense", true) == 0 || strcmp(cmd, "/agl", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] >= 1337)
            {
                new x_nr[256];
                x_nr = strtok(cmdtext, idx);
                if(!strlen(x_nr)) {
                    SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /agivelicense [name] [playerid/PartOfName]");
                    SendClientMessage(playerid, COLOR_WHITE, "» Nume: Driving, Pilots, Sailing, Fishing, Weapon.");
                    return 1;
                }
                if(strcmp(x_nr,"driving",true) == 0)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /agivelicense driverslicense [playerid/PartOfName]");
                        return 1;
                    }
                    giveplayerid = ReturnUser(tmp);
                    if(IsPlayerConnected(giveplayerid))
                    {
                        if(giveplayerid != INVALID_PLAYER_ID)
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "» I-ai dat Permisu de Conducere lui %s.",giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "» Ai primit Permisu de Conducere de la Admin-ul %s.",sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            PlayerInfo[giveplayerid][pCarLic] = 1;
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "{30a030}[ProMyx]: {6f8716}Acest jucator nu este Online.");
                        return 1;
                    }
                }
                else if(strcmp(x_nr,"Pilots",true) == 0)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /agivelicense Pilotslicense [playerid/PartOfName]");
                        return 1;
                    }
                    giveplayerid = ReturnUser(tmp);
                    if(IsPlayerConnected(giveplayerid))
                    {
                        if(giveplayerid != INVALID_PLAYER_ID)
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "» I-ai dat Licenta de Pilotaj lui %s.",giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "» Ai primit Licenta de Pilotaj de la Admin-ul %s.",sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            PlayerInfo[giveplayerid][pFlyLic] = 1;
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "{30a030}[ProMyx]: {6f8716}Acest jucator nu este Online.");
                        return 1;
                    }
                }
                else if(strcmp(x_nr,"sailing",true) == 0)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /agivelicense sailinglicense [playerid/PartOfName]");
                        return 1;
                    }
                    giveplayerid = ReturnUser(tmp);
                    if(IsPlayerConnected(giveplayerid))
                    {
                        if(giveplayerid != INVALID_PLAYER_ID)
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "» I-ai dat Licenta de Nevigat lui %s.",giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "» Ai primi Licenta de Navigat de la Admin-ul %s.",sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            PlayerInfo[giveplayerid][pBoatLic] = 1;
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "{30a030}[ProMyx]: {6f8716}Acest jucator nu este Online.");
                        return 1;
                    }
                }
                else if(strcmp(x_nr,"fishing",true) == 0)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /agivelicense fishinglicense [playerid/PartOfName]");
                        return 1;
                    }
                    giveplayerid = ReturnUser(tmp);
                    if(IsPlayerConnected(giveplayerid))
                    {
                        if(giveplayerid != INVALID_PLAYER_ID)
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "» I-ai dat Licenta de Pescuit lui %s.",giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "» Ai primit Licenta de Pescuit de la Admin-ul %s.",sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            PlayerInfo[giveplayerid][pFishLic] = 1;
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "{30a030}[ProMyx]: {6f8716}Acest jucator nu este Online.");
                        return 1;
                    }
                }
                else if(strcmp(x_nr,"weapon",true) == 0)
                {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "» Scrie: /agivelicense weaponlicense [playerid/PartOfName]");
                        return 1;
                    }
                    giveplayerid = ReturnUser(tmp);
                    if(IsPlayerConnected(giveplayerid))
                    {
                        if(giveplayerid != INVALID_PLAYER_ID)
                        {
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                            format(string, sizeof(string), "» I-ai dat Licenta de Port Arma lui %s.",giveplayer);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "» Ai primit Licenta de Port Arma de la Admin-ul %s.",sendername);
                            SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
                            PlayerInfo[giveplayerid][pGunLic] = 1;
                            return 1;
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "{30a030}[ProMyx]: {6f8716}Acest jucator nu este Online.");
                        return 1;
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "{30a030}[ProMyx]: {6f8716}Ne pare rau, dar nu ai acces la aceasta comanda.");
                return 1;
            }
        }
        return 1;
    }

The error list :

pawn Код:
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(17425) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(18334) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(18679) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(19340) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(21716) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(22018) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(22141) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(30234) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(30268) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(31108) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(35330) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(37303) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(37423) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(37592) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(38714) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(39459) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(39709) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(40035) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(40182) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(40917) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(42764) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(43700) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(43805) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(44237) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(44376) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(44700) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(44816) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(44949) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(50585) : warning 219: local variable "x_nr" shadows a variable at a preceding level
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54104) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54106) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54108) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54111) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54112) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54115) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54117) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54120) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54123) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54126) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54128) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54137) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54140) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54143) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54146) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54149) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54152) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54155) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54157) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54166) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54169) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54172) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54175) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54178) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54181) : error 010: invalid function or declaration
D:\Jocuri\Kituri\Server samp\gamemodes\XX.pwn(54184) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


26 Errors.
Reply


Messages In This Thread
A bunch of erros - by Tyrexo - 18.05.2013, 00:55
Re: A bunch of erros - by edgargreat - 18.05.2013, 01:30
Re: A bunch of erros - by Tyrexo - 18.05.2013, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)