SA-MP Forums Archive
(772) : warning 217: loose indentation - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: (772) : warning 217: loose indentation (/showthread.php?tid=665623)



(772) : warning 217: loose indentation - ShaggyShaggy - 11.04.2019

{
DestroyVehicle(Veh[playerid][VehId]);
(772) new Float:a;
GetPlayerFacingAngle(playerid, a);
GetPlayerPos(playerid, x, y, z);

if(IsPlayerInAnyVehicle(playerid) == 1)
{
GetXYInFrontOfPlayer(playerid, x, y, 8);
}
else
{
GetXYInFrontOfPlayer(playerid, x, y, 5);
}

new PlayersVehicle = CreateVehicle(vehicle, x, y, z, a+90, -1, -1, -1);
Veh[playerid][VehId] = PlayersVehicle;
LinkVehicleToInterior(PlayersVehicle, GetPlayerInterior(playerid));
}
format(String, sizeof(String), "Ai spawnat %s", aVehicleNames[vehicle - 400]);
SendClientMessage(playerid,portocaliu, String);
return 1;
}
return 0;
}


Re: (772) : warning 217: loose indentation - jasperschellekens - 11.04.2019

Please use code tags to make your code more read-able.
Also, this isn't an error but an indentation warning.

Correct indentation:
PHP Code:
Function(playerid)
{
    
//do something
    
return 1;

Incorrect indentation:
PHP Code:
Function(playerid)
   {
      
//do something
  
return 1;
 }