Loose Identation - 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 Identation (
/showthread.php?tid=272514)
Loose Identation -
0_o - 28.07.2011
I always have this problem with Scratch. How To Disable This?
pawn Код:
C:\Alex\Server\gamemodes\SW.pwn(352) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Re: Loose Identation -
Mean - 28.07.2011
https://sampforum.blast.hk/showthread.php?tid=256961
Re: Loose Identation -
0_o - 28.07.2011
Well So there's No Way To Fix It? I Mean In LVDM You Can Do anything.
Re: Loose Identation -
PrawkC - 28.07.2011
.... /facepalm
You can use #pragma tabsize 0 .. but thats incredibly lazy to use, follow means guide.
Re: Loose Identation -
Shockey HD - 28.07.2011
Post The Code...
Re: Loose Identation -
Mean - 28.07.2011
Quote:
Originally Posted by PrawkC
.... /facepalm
|
This.
I mean, go to the LVDM gamemode, and freaking indent it.
Also: I remember one day you were calling one guy a "fucking noob", well, I'd basically say the same now...
Re: Loose Identation -
Kingunit - 28.07.2011
You are fucking with the tabs. Post the code here so we can fix it, and so you can look to it and see what you are doing wrong
Re: Loose Identation -
Kaperstone - 28.07.2011
oh.. lol
loose indentation damage your script so you should try to fix this
idk how to explane so i will just give you an example...
WRONG: (what give you thet warning)
pawn Код:
if (strcmp("/hna", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
return 1;
}
GOOD:
pawn Код:
if (strcmp("/hna", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
return 1;
}
or put under #include ::
but i suggest you to take the first option
Re: Loose Identation -
M4z - 28.07.2011
xkirill: "loose indentation damage your script so you should try to fix this

"
Incorrect Version:
pawn Код:
if (strcmp("/hna", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
return 1;
}
Having loose indentation doesn't damage your script, it just makes it unclear and annoying when you receive warnings. Also, that example you posted would give warnings because of the place your return statement is in.
Correct Version:
pawn Код:
if (strcmp("/hna", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
return 1;
}
Re: Loose Identation -
Kaperstone - 28.07.2011
oh... shit >.<
its a forum bug...
i did it right... the fourm just posted it like thet..
nvm fixed...
EDIT:FIXED