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



warning 217: loose indentation - Fugative. - 26.02.2010

Error
Код:
(1754) : warning 217: loose indentation
Code on line 1754
pawn Код:
for(new f = 0; f < 9; f++){TextDrawShowForPlayer(playerid,Spawntext[f]);}



Re: warning 217: loose indentation - bajskorv123 - 26.02.2010

pawn Код:
for(new f = 0; f < 9; f++) TextDrawShowForPlayer(playerid,Spawntext[f]);
OR
pawn Код:
for(new f = 0; f < 9; f++)
{
  TextDrawShowForPlayer(playerid,Spawntext[f]);
}



Re: warning 217: loose indentation - Fugative. - 26.02.2010

They all show with warnings I'm afraid.


Re: warning 217: loose indentation - BlackFoX - 26.02.2010

Код:
{
Code(); // It returns to Warning
}
Код:
{
Code(); // Loose Identation...
}
    return 1;
Код:
{
Code(); // No Warnings...
}
return 1;
Struc. of Code
pawn Код:
{ // Block
   /*1x Tab Space */
   DoSomething();
   {
       /* 2x Tabspace */
       DoSomething();
   } // End of Block 2
   DoSomething();
   /* 1x Tabspace */
}
DoSomething();
Loose Indentation means the structure of your Code


Re: warning 217: loose indentation - [nl]daplayer - 26.02.2010

Quote:
Originally Posted by Fugitive.
They all show with warnings I'm afraid.
Then this is the wrong line, because it compiles fine for me..
Maybe you something like this:
pawn Код:
stock function()
{
  for(new f = 0; f < 9; f++)
  {
    TextDrawShowForPlayer(playerid,Spawntext[f]);
  }
}
Note: Every tab/whitespace sperator needs to be 4 spaces
In the case above, the whitespace before the for loop is 3 spaces.

So it will give a warning:
Код:
(1754) : warning 217: loose indentation
EDIT: I just see someone posted before me.. lol


Re: warning 217: loose indentation - bajskorv123 - 26.02.2010

Show me the whole part of your code, what comes before your error row, and after it


Re: warning 217: loose indentation - Jeffry - 26.02.2010

At Top of your script:
pawn Код:
#pragma tabsize 0
This will ignore the warnings of indentation.


Re: warning 217: loose indentation - bajskorv123 - 26.02.2010

Quote:
Originally Posted by Jeffry
Код:
At Top of your script:
[pawn]#pragma tabsize 0
This will ignore the warnings of indentation.
Lol i was going to write that but then i thought maybe it wouldnt work there and wrote the other thingy


Re: warning 217: loose indentation - Fugative. - 26.02.2010

Thanks for the help guys