[Ajuda] Erros e Warnings
#1

pawn Код:
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46436) : error 017: undefined symbol "c"
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46444) : warning 219: local variable "valor" shadows a variable at a preceding level
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46444) : error 017: undefined symbol "TCarModel"
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46445) : warning 213: tag mismatch
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46446) : warning 213: tag mismatch
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46447) : error 021: symbol already defined: "price"
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46448) : error 017: undefined symbol "Model"
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46445) : warning 204: symbol is assigned a value that is never used: "price"
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46444) : warning 204: symbol is assigned a value that is never used: "valor"
C:\Users\Joгo\Desktop\RP_DE_MERDA\Rp\gamemodes\GMRP.pwn(46443) : warning 204: symbol is assigned a value that is never used: "cModel"
Linha 46436
pawn Код:
if(DynamicCars[c][Sell] == 1)
Linha 46444
pawn Код:
new valor = TCarModel-400;
Linha 46444
pawn Код:
new valor = TCarModel-400;
Linha 46445
pawn Код:
new price = VehiclePrices[valor][0]/2;
Linha 46446
pawn Код:
new till = VehiclePrices[valor][0]/5;
Linha 46447
pawn Код:
new price = price+till;
Linha 46448
pawn Код:
format(string, sizeof(string), "~w~Nome: ~g~%s ~n~~w~Preco:~g~ %d Euros~n~~w~Faz ~r~/carrocomprar ~w~para o comprares", VehicleNames[Model-400], cprice);
Linha 46445
pawn Код:
new price = VehiclePrices[valor][0]/2;
Linha 46444
pawn Код:
new valor = TCarModel-400;
Linha 46443
pawn Код:
new cModel = GetVehicleModel(vehicleid);
Cуdigo que estou a modificar e onde dб estes erros:
pawn Код:
if(IsPlayerInAnyVehicle(playerid) == 1)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(DynamicCars[c][Sell] == 1)
        {
            new Float:playerposx, Float:playerposy, Float:playerposz;
            GetPlayerPos(playerid, playerposx, playerposy, playerposz);
            if(PlayerInfo[playerid][CarKey6] != 4)
            {
                new string[128];
                new cModel = GetVehicleModel(vehicleid);
                new valor = TCarModel-400;
                new price = VehiclePrices[valor][0]/2;
                new till = VehiclePrices[valor][0]/5;
                new price = price+till;
                format(string, sizeof(string), "~w~Nome: ~g~%s ~n~~w~Preco:~g~ %d Euros~n~~w~Faz ~r~/carrocomprar ~w~para o comprares", VehicleNames[Model-400], cprice);
                GameTextForPlayer(playerid, string, 3500, 3);
                TogglePlayerControllable(playerid, 1);

            }
            else
            {
                SetPlayerPos(playerid,playerposx, playerposy, playerposz);
                SendClientMessage(playerid,COLOR_WHITE,"ERRO: Ja nгo podes comprar mais carros.");
            }
        }
    }
Cуdigo que estб noutro GameMode diferente e й o "original"
pawn Код:
if(IsPlayerInAnyVehicle(playerid) == 1)
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(Car[vehicleid][Sell] == 1)
        {
            new Float:playerposx, Float:playerposy, Float:playerposz;
            GetPlayerPos(playerid, playerposx, playerposy, playerposz);
            if(PlayerInfo[playerid][msNCarKey] != 4)
            {
                new string[128];
                new cModel = GetVehicleModel(vehicleid);
                new valor= cModel-400;
                new price = VehiclePrices[valor][0]/2;
                new ctill = VehiclePrices[valor][0]/5;
                new cprice = price+ctill;
                format(string, sizeof(string), "~w~Nome: %s ~n~Preco:~g~ %d Euros~n~~w~Faz ~y~/carrocomprar ~w~para o comprares", VehicleNames[cModel-400], cprice);
                GameTextForPlayer(playerid, string, 3500, 3);
                TogglePlayerControllable(playerid, 0);

            }
            else
            {
                SetPlayerPos(playerid,playerposx, playerposy, playerposz);
                SendClientMessage(playerid,COLOR_WHITE,"ERRO: Ja nгo podes comprar mais carros.");
            }
        }
    }
Enums do do GM "antigo"
pawn Код:
enum Cars
{
    CarModel,
    Float:CarX,
    Float:CarY,
    Float:CarZ,
    Float:CarAngle,
    CarColor1,
    CarColor2,
    FactionCar,
    CarType,
    Matricula[MAX_PLAYER_NAME],
    Matriculed,
    Neon,
};
new DynamicCars[120][Cars];
//=======
enum CarSystem
{
    Owner[MAX_PLAYER_NAME],
    CarModel,
    CarID,
    Float:ParkX,
    Float:ParkY,
    Float:ParkZ,
    Float:ParkAngle,
    CarColor1,
    CarColor2,
    Owned,
    Materials,
    cCocaina,
    cHeroina,
    cExtasy,
    cErva,
    cPolen,
    Sell,
    Locked,
    Matricula[128],
    Matriculed,
    GuardaArmas1[128],
    GuardaArmas2[128],
    GuardaArmas3[128],
    GuardaArmas4[128],
    GuardaArmas5[128],
    Neon,
};
new Car[MAX_VEHICLES][CarSystem];

Enums de carros do GM que estou a codar
pawn Код:
enum Cars
{
    CarModel,
    Float:CarX,
    Float:CarY,
    Float:CarZ,
    Float:CarAngle,
    CarColor1,
    CarColor2,
    FactionCar,
    CarType,
    Neon,
    cComponent0,
    cComponent1,
    cComponent2,
    cComponent3,
    cComponent4,
    cComponent5,
    cComponent6,
    cComponent7,
    cComponent8,
    cComponent9,
    cComponent10,
    cComponent11,
    cComponent12,
    cComponent13,
    cPaintjob,
    cDrogas,
    buy,
    comprado,
    valor,
    Int,
    VW,
    CArmas1,
    CArmas2,
    CArmas3,
    CArmas4,
    CArmas5,
    CArmas6,
    CArmas7,
    CArmas8,
    CArmas9,
    CBalas1,
    CBalas2,
    CBalas3,
    CBalas4,
    CBalas5,
    CBalas6,
    CBalas7,
    CBalas8,
    CBalas9,
    Matricula[10],
    Multas,
    Licenca,
};
new DynamicCars[998][Cars];
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)