[Hlep] Warnings - 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: [Hlep] Warnings (
/showthread.php?tid=67243)
[Hlep] Warnings -
tony_fitto - 27.02.2009
hey i have a question its a warning
when i do compleat / run in the script i get 57 warnings every one it says
warning 217: loose indentation
what it is exactly ? warning 217: loose indentation
Re: [Hlep] Warnings -
JaYmE - 27.02.2009
tab it in ¬¬
Loose indentation ^
Proper indentation
P.S warnings dont harm the server :P
Re: [Hlep] Warnings -
tony_fitto - 28.02.2009
Quote:
Originally Posted by JaYmE
tab it in ¬¬
Loose indentation ^
Proper indentation
P.S warnings dont harm the server :P
|
Aha okej thx good but its there on some commands too like /detain and that stuff and in the mittle of the commands but thx any way this will help me much
Re: [Hlep] Warnings -
Pghpunkid - 28.02.2009
its 1 tab in per if statement.. for example..
public/stock statements have 0 tab spaces.
The code in those are 1 tab space.
If there is a if statement inside, the condition is 1 tab space, open bracket, then 2 tab spaces.. Example given:
pawn Код:
public OnGameModeInit {
if (somevariable == 1) {
if (someothervariable == 255) {
print("This is the way things should be indented.");
}
else {
print("This will prevent 'loose indentation' warnings.");
}
if (anothervariable == 60) {
if (thereisanifinaif == 1) {
tabagain=1;
}
}
}
return 1;
}
Re: [Hlep] Warnings -
Kriztian - 28.02.2009
At top of script
Or something like that
Re: [Hlep] Warnings -
Pghpunkid - 28.02.2009
Quote:
Originally Posted by Chrysanthemum
At top of script
Or something like that
|
Indenting properly is the clean, professional, and least hassle way of doing things. I recommend NOT using pragma tabsize 0.