[Pomoc] Warning

Započeo tWix, Decembar 20, 2010, 01:13:31 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Sta ovde nije u redu  ???

Public:
public Speedometer()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
{
            new pState = GetPlayerState(i);
            new pVeh = GetPlayerVehicleID(i);
            new pModel = GetVehicleModel(pVeh); // LINIJA 44678
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && pState == PLAYER_STATE_DRIVER && pModel != 509 && pModel != 510 && pModel != 481) //LINIJA 44679
    {
        if(ShowSpeed[i] == 1)
        {
            #define MULTIPLY_SPEED  4
new Float:x, Float:y, Float:z, Float:Dis, Float:health, string[256];
GetPlayerPos(i, x, y, z); GetVehicleHealth(GetPlayerVehicleID(i), health); new getthecar = GetPlayerVehicleID(i);
new VehicleModel = GetVehicleModel(GetPlayerVehicleID(i));

Dis = floatsqroot(floatpower(floatabs(floatsub(OldCoordsX[i],x)),2) + floatpower(floatabs(floatsub(OldCoordsY[i],y)),2));
if(Fuel[getthecar] <= 0){ RemovePlayerFromVehicle(i); SendClientMessage(i, COLOR_YELLOW, "Your vehicle has ran out of fuel! Have a nice walk");}
if(VehicleModel==509||VehicleModel==481||VehicleModel==510) {SetVehicleHealth(GetPlayerVehicleID(i), 1000); Fuel[getthecar] = 100;}
if(VehicleModel==520||VehicleModel==476||VehicleModel==593||VehicleModel==553||VehicleModel==513||VehicleModel==512||VehicleModel==577||VehicleModel==592||VehicleModel==511||VehicleModel==539||VehicleModel==464||VehicleModel==519 ||VehicleModel==538 ||VehicleModel==570) { Fuel[getthecar] = 100; }
new speed = (floatround(Dis)*MULTIPLY_SPEED);

    if( speed == 0 ){
    format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);

} else if( speed >= 1 && speed <= 99 ){
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.02;
} else if( speed >= 100 && speed <= 179 ){
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.07;
} else if( speed >= 179 && speed <= 200 ){
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.07;
} else if( speed >= 200 && speed <= 230 ){
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.07;
} else if( speed >= 230 && speed <= 270 ){
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.07;
} else if( speed >= 270 && speed <= 300 ){
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.07;
} else {
format(string,sizeof(string),"~B~Vozilo: ~w~%s   ~B~Brzina: ~Y~%dkm/h ~n~             ~B~Gorivo: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
Fuel[getthecar] -= 0.08;
}

TextDrawSetString(Speedom[i],string);

TextDrawShowForPlayer(i, Speedom[i]);
OldCoordsX[i] = x; OldCoordsY[i] = y;
} else { TextDrawHideForPlayer(i,Speedom[i]); }
}
}
return true;
}


Warninzi:
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC4\gamemodes\CYBER.pwn(44678) : warning 219: local variable "pModel" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC4\gamemodes\CYBER.pwn(44679) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC4\gamemodes\CYBER.pwn(44679) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC4\gamemodes\CYBER.pwn(44679) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\Desktop\Cyber Roleplay0.3c RC4\gamemodes\CYBER.pwn(44678) : warning 204: symbol is assigned a value that is never used: "pModel"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Warnings.


Cyb3r
           Roleplay
                        In progress by: tWix

Forum: Klik
IP: 62.75.247.14:9545

ja mislim da trebas obrisati il dodati variablu pModel