#1

I have little problem!

PHP код:
    if (strcmp("/skatepark"cmdtexttrue10) == 0)
    {
         new 
VehidVehmodel;
         
Vehid GetPlayerVehicleID(playerid);
         
Vehmodel GetVehicleModel(Vehid);
         if(
Vehmodel == 571)
         {
         
SendClientMessage(playerid0xAA3333AA"Sk8park!");
         return 
1;
         }
         else if (
IsPlayerInAnyVehicle(playerid))
         {
         
SetVehiclePos(GetPlayerVehicleID(playerid), 1887.5681, -1389.860613.5703);
         
SetVehicleZAngle(GetPlayerVehicleID(playerid), 87.9845);
         
SetPlayerInterior(playerid0);
         }
         else if (!
IsPlayerInAnyVehicle(playerid))
         {
        
SetPlayerPos(playerid1887.5681, -1389.860613.5703);
        
SetPlayerFacingAngle(playerid87.9845);
        
SetPlayerInterior(playerid0);
        }
        return 
1// this line i get "warning 217: loose indentation"
}
    return 
0;
    } 
Reply
#2

There is too many {}{}{}{}{}{}{}{}}}}}{}}{{}

pawn Код:
if (strcmp("/skatepark", cmdtext, true, 10) == 0)
{
    new Vehid, Vehmodel;
    Vehid = GetPlayerVehicleID(playerid);
    Vehmodel = GetVehicleModel(Vehid);
    if(Vehmodel == 571)
    {
        SendClientMessage(playerid, 0xAA3333AA, "Sk8park!");
        return 1;
    }
    else if (IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), 1887.5681, -1389.8606, 13.5703);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 87.9845);
        SetPlayerInterior(playerid, 0);
    }
    else if (!IsPlayerInAnyVehicle(playerid))
    {
        SetPlayerPos(playerid, 1887.5681, -1389.8606, 13.5703);
        SetPlayerFacingAngle(playerid, 87.9845);
        SetPlayerInterior(playerid, 0);
    }
    return 1;
}
Reply
#3

Lol if I delete any { than i get +10 warnings and errors
Reply
#4

You have to add one.
Check that you have the same amout of opening '{' & closing '}'
Reply
#5

pawn Код:
if (strcmp("/skatepark", cmdtext, true, 10) == 0)
    {
         new Vehid, Vehmodel;
         Vehid = GetPlayerVehicleID(playerid);
         Vehmodel = GetVehicleModel(Vehid);
         if(Vehmodel == 571)
         {
         SendClientMessage(playerid, 0xAA3333AA, "Sk8park!");
         return 1;
         }
         else if (IsPlayerInAnyVehicle(playerid))
         {
         SetVehiclePos(GetPlayerVehicleID(playerid), 1887.5681, -1389.8606, 13.5703);
         SetVehicleZAngle(GetPlayerVehicleID(playerid), 87.9845);
         SetPlayerInterior(playerid, 0);
         }
         else if (!IsPlayerInAnyVehicle(playerid))
         {
         SetPlayerPos(playerid, 1887.5681, -1389.8606, 13.5703);
         SetPlayerFacingAngle(playerid, 87.9845);
         SetPlayerInterior(playerid, 0);
         }
         return 1;
    }
Try this.
Reply
#6

Finally compile thank you! MikkelGutten & Jeffry
Reply
#7

No problem. Have fun!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)