PDA

View Full Version : [HELP] warning 217: loose indentation +REP


Oscii
05/05/2012, 11:34 PM
Hello..

Im always getting these warnings


: warning 217: loose indentation

When i add pieces of mapping codes..


my pawno line with a error

AddStaticVehicleEx(520,415.60000610,2447.39990234, 17.39999962,0.00000000,-1,-1,15); //Hydra

Regards
Oscii.

miley1
05/05/2012, 11:36 PM
Shouldt add like 3 spacebars into it like the others are been made

ReneG
05/05/2012, 11:37 PM
Make sure the code is properly alligned.

Bad Way.
public OnGameModeExit()
{
CreateObject(...);
return 1;
}
Good Way.
public OnGameModeExit()
{
CreateObject(...);
return 1;
}

ToiletDuck
05/05/2012, 11:40 PM
AddStaticVehicleEx(520,415.60000610, 2447.39990234, 17.39999962,0.00000000,-1,-1,15);


try this

Elysian`
05/05/2012, 11:40 PM
Just add to the top of your script:
#pragma tabsize 0
It will get rid of ALL loose indentations that you may experience in the future.

Oscii
05/05/2012, 11:43 PM
Just add to the top of your script:
#pragma tabsize 0
It will get rid of ALL loose indentations that you may experience in the future.

Wow.

Thank you very much!,


And thank you to everyone else that helped me! :)


Rep'd

Oscii
05/05/2012, 11:45 PM
+1Rep'd everyone that helped me.

Disturn
05/05/2012, 11:57 PM
Good coding practices include proper indentation. It allows your code to be easier to read. This is why the usage of #pragma tabsize 0 isn't recommended.

Oscii
05/05/2012, 11:58 PM
It isnt recomended?,

What could go wrong with

#pragma tabsize 0

Disturn
06/05/2012, 12:11 AM
It isnt recomended?,

What could go wrong with

#pragma tabsize 0

Nothing. Though as I've said, it only allows your code to be easier to read. A programmer's conception is as good as how he interprets the code.

Meaning this...


function()
{
new integer = 0;
for(;++integer;)
{
printf("%d", integer);
if(integer == 5)
{
break;
}
}
}



function()
{
new integer = 0;
for(;++integer;)
{
printf("%d", integer);
if(integer == 5) {
break;
}
}
}


...is easier to read than this.

Oscii
06/05/2012, 12:12 AM
Ah!, i see.

Thank you for letting me know :)

+rep for helping.

Konnor_ExperT
03/10/2012, 08:25 PM
AddStaticVehicle(520,415.60000610, 2447.39990234, 17.39999962,0.00000000,-1,-1,15);

Emmet_
03/10/2012, 08:45 PM
AddStaticVehicle(520,415.60000610, 2447.39990234, 17.39999962,0.00000000,-1,-1,15);

You really didn't need to bump this topic...

SwisherSweet
03/10/2012, 09:09 PM
Ya #pragma tabsize 0 isn't recommended me i never used this not once...
Loose indention meaning look closly

public OnPlayerCommandText(playerid, cmdtext[])
{
//codecodecode
return 1;
}

This is bad way

public OnPlayerCommandText(playerid, cmdtext[])
{
//codecodecode
return 1;
}

this is bad way too it has too be in one line with the return 1;

public OnPlayerCommandText(playerid, cmdtext[])
{
//codecodecode
return 1;
}

This is correct!!!

RafaelZam
07/01/2013, 02:20 AM
Make sure the code is properly alligned.

Bad Way.
public OnGameModeExit()
{
CreateObject(...);
return 1;
}
Good Way.
public OnGameModeExit()
{
CreateObject(...);
return 1;
}

thnx !:***

50jaker
25/03/2013, 02:11 PM
THanks for solucion
#pragma tabsize 0

Dragonul
18/08/2016, 09:25 AM
amxmod studio, download , and press ctrl i and ctrl s

SyS
18/08/2016, 03:44 PM
amxmod studio, download , and press ctrl i and ctrl s

took 4 years to type that?