Warnings ! :)
#1

Hey guys ! Can someone help me with this warnings ? Thanks :
pawn Код:
C:\Users\Win7\Desktop\Stunt King Romania 0.3d\Server\gamemodes\SKR.pwn(10510) : warning 217: loose indentation
C:\Users\Win7\Desktop\Stunt King Romania 0.3d\Server\gamemodes\SKR.pwn(12802) : warning 225: unreachable code
C:\Users\Win7\Desktop\Stunt King Romania 0.3d\Server\gamemodes\SKR.pwn(12802) : warning 217: loose indentation
C:\Users\Win7\Desktop\Stunt King Romania 0.3d\Server\gamemodes\SKR.pwn(12814) : warning 225: unreachable code
C:\Users\Win7\Desktop\Stunt King Romania 0.3d\Server\gamemodes\SKR.pwn(12814) : warning 217: loose indentation
Line 10510 :
pawn Код:
if (!strcmp("/v Boxville2", cmdtext, true))
    {
        if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);
        new Float:X,Float:Y,Float:Z,Float:ROT;
        GetPlayerPos(playerid,X,Y,Z);
        GetPlayerFacingAngle (playerid,ROT);
        SetVehicleNumberPlate(SpawnedVehicles[playerid] = CreateVehicle(606,X,Y,Z,ROT,-1,-1,60), "{0095FF}S{E5FF00}K{FF0000}R");
        PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
        GameTextForPlayer(playerid,"~h~~w~Boxville 2~n~~h~~w~ID:~h~~r~606",2500,1);
        return 1;
     }
     return 0; // Here is the line with warning.
}
Line 12802 :
pawn Код:
COMMAND:yes(playerid, params[])
{
   new playerstate = GetPlayerState(playerid);
   if(playerstate == PLAYER_STATE_DRIVER) {
   return ModCar(playerid);
        }
        else {
           return SendClientMessage(playerid, COLOR_RED, "[EROARE] Nu poti tuna masina daca nu esti sofer.");
    }
    return 1; // Here is the line with warning.
}
Line 12814 :
pawn Код:
COMMAND:tunar(playerid, params[])
{
   new playerstate = GetPlayerState(playerid);
   if(playerstate == PLAYER_STATE_DRIVER) {
   return ModCar(playerid);
        }
        else {
        return SendClientMessage(playerid, COLOR_RED, "[EROARE] Nu poti tuna masina daca nu esti sofer.");
    }
    return 1; // Here is the line with warning.
}
I tried much things but no change ...
Reply
#2

you have one } bracklet to much

pawn Код:
if (!strcmp("/v Boxville2", cmdtext, true))
    {
        if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);
        new Float:X,Float:Y,Float:Z,Float:ROT;
        GetPlayerPos(playerid,X,Y,Z);
        GetPlayerFacingAngle (playerid,ROT);
        SetVehicleNumberPlate(SpawnedVehicles[playerid] = CreateVehicle(606,X,Y,Z,ROT,-1,-1,60), "{0095FF}S{E5FF00}K{FF0000}R");
        PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
        GameTextForPlayer(playerid,"~h~~w~Boxville 2~n~~h~~w~ID:~h~~r~606",2500,1);
        return 1;
}
Reply
#3

Your script is not currectly placed in order
Can show you becouse I'm on my Phone
Reply
#4

Quote:
Originally Posted by milanosie
Посмотреть сообщение
you have one } bracklet to much

pawn Код:
if (!strcmp("/v Boxville2", cmdtext, true))
    {
        if(SpawnedVehicles[playerid] != 0) DestroyVehicle(SpawnedVehicles[playerid]);
        new Float:X,Float:Y,Float:Z,Float:ROT;
        GetPlayerPos(playerid,X,Y,Z);
        GetPlayerFacingAngle (playerid,ROT);
        SetVehicleNumberPlate(SpawnedVehicles[playerid] = CreateVehicle(606,X,Y,Z,ROT,-1,-1,60), "{0095FF}S{E5FF00}K{FF0000}R");
        PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
        GameTextForPlayer(playerid,"~h~~w~Boxville 2~n~~h~~w~ID:~h~~r~606",2500,1);
        return 1;
}
Nope.Isan't this.I tried and give me lots of errors.
Reply
#5

why and how are you using zcmd and strcmp together?
pawn Код:
("/v Boxville2"
i think the space is giving the errors.

pawn Код:
COMMAND:yes(playerid, params[])
{
    new playerstate = GetPlayerState(playerid);
    if(playerstate == PLAYER_STATE_DRIVER) return ModCar(playerid);
    else return SendClientMessage(playerid, COLOR_RED, "[EROARE] Nu poti tuna masina daca nu esti sofer.");
   
}
pawn Код:
COMMAND:tunar(playerid, params[])
{
   new playerstate = GetPlayerState(playerid);
   if(playerstate == PLAYER_STATE_DRIVER) return ModCar(playerid);
   else return SendClientMessage(playerid, COLOR_RED, "[EROARE] Nu poti tuna masina daca nu esti sofer.");
}
Reply
#6

Quote:
Originally Posted by emokidx111
Посмотреть сообщение
why and how are you using zcmd and strcmp together?
pawn Код:
("/v Boxville2"
i think the space is giving the errors.

pawn Код:
COMMAND:yes(playerid, params[])
{
    new playerstate = GetPlayerState(playerid);
    if(playerstate == PLAYER_STATE_DRIVER) return ModCar(playerid);
    else return SendClientMessage(playerid, COLOR_RED, "[EROARE] Nu poti tuna masina daca nu esti sofer.");
   
}
pawn Код:
COMMAND:tunar(playerid, params[])
{
   new playerstate = GetPlayerState(playerid);
   if(playerstate == PLAYER_STATE_DRIVER) return ModCar(playerid);
   else return SendClientMessage(playerid, COLOR_RED, "[EROARE] Nu poti tuna masina daca nu esti sofer.");
}
Thanks i fixed 2/3 warnings.Warning with line 10511 (Boxville2 command) wasen't fixed.
Reply
#7

Comment out the returns in the strcmp commands.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)