SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: loose Indentation (/showthread.php?tid=154214)



loose Indentation - Tnt12340 - 12.06.2010

What the hell does it mean, and how do i fix it? :P

Thanks!

<3

- Eric


Re: loose Indentation - zSuYaNw - 12.06.2010



Use :
//command here
return 1;
}


Re: loose Indentation - Flashy - 12.06.2010

Quote:
Originally Posted by TheGarfield

Use :
//command here
return 1;
}
What? You donґt hear nothing about scripting, or?

Lose intention means when a bracket or a line is wrongly tabed.
You can resolve this by add #pragma tabsize 0 on top of your script or watch if your lines are correctly in teh same line.


Re: loose Indentation - DarkPower - 12.06.2010

#pragma tabsize 1


Re: loose Indentation - MPKaboose - 12.06.2010

pawn Код:
// Good
public Blah( )
{
 new lol;
 lol = 1;
 return lol;
}
// Bad will give the warning
public Blah( )
{
 new lol;
  lol = 1;
 return lol;
}
simple as that


Re: loose Indentation - Tnt12340 - 12.06.2010

Does the pragma thing effect the script at all? How it runs? Anything? :P


Re: loose Indentation - Niixie - 12.06.2010

Mah, dont use #pragma tapsize ....


Re: loose Indentation - NewTorran - 12.06.2010

Code that will bring loose indentation warning:
pawn Код:
if(strcmp(cmdtext, "/salami", true) == 0)
 {
  SetPlayerPos(playerid, ....
return 1;
 }
Code that wont bring loose indentation warning:
[pawn]if(strcmp(cmdtext, "/salami", true) == 0)
{
SetPlayerPos(playerid, ....
return 1;
}[pawn]

Also

pawn Код:
#pragma tabsize 0
If you use this you are DOOMED!
( Na you wont be but in all seriousness dont use it )


Re: loose Indentation - Hiddos - 12.06.2010

Filling in parameters wrongly also cause a loose identation (Example: Filling in a Float value in an integer parameter)