Losse indentation warning -
hazthekid - 03.03.2012
how can I fix this ? all the lines what are warnings are mapping lines
C:\Users\harry\Desktop\Blaze server\pawno\vx-rp.pwn(616) : warning 217: loose indentation
C:\Users\harry\Desktop\Blaze server\pawno\vx-rp.pwn(3663) : warning 217: loose indentation
C:\Users\harry\Desktop\Blaze server\pawno\vx-rp.pwn(3843) : warning 217: loose indentation
C:\Users\harry\Desktop\Blaze server\pawno\vx-rp.pwn(398

: warning 217: loose indentation
I try using http://dracoblue.net/tidy/pawn/ but I get even more warnings:
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(6989) : error 075: input line too long (after substitutions)
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(746

: error 075: input line too long (after substitutions)
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7469) : error 017: undefined symbol "pAdminN"
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7470) : warning 217: loose indentation
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7470) : error 017: undefined symbol "ame"
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7470) : error 029: invalid expression, assumed zero
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7471) : warning 217: loose indentation
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7471) : error 029: invalid expression, assumed zero
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7471) : warning 215: expression has no effect
C:\Users\harry\Desktop\Blaze server-back up\pawno\vx-rp.pwn(7473) : warning 217: loose indentation
The fixer will get +1 rep
Re: Losse indentation warning -
arathin - 04.03.2012
Do you have TV? if so pm me your details i can fix it.
Re: Losse indentation warning -
Boooth - 04.03.2012
If you want to fix the warnings, go with arathins offer of help.
Else if you just want a quick and easy fix then go to the top of your script around where your #define's are and add the following code:
Re: Losse indentation warning -
TRIPLE-xXx-GAMEING - 04.03.2012
loose identation is nothing just a simple warn mostly made due to adding more spaces in a function pm me the pwn i can fix it or simple
Where ever a function starts like:
public OnPlayerConnct(playerid);
{
SetGameModeText("~w~WELCOME TO THE SERVER~n~~r~%s~n~~b~DO /help FOR HELP);
return 1;
}
if you write the function like this it will give the error loose identitaon o the line whre return 1 is situated so try to make things in a function in a strait line like
{
SetGameModeText("~w~WELCOME TO THE SERVER~n~~r~%s~n~~b~DO /help FOR HELP);
GivePlayerWeapon(playerid,24,99999999999):
return 1;
}
HOPE THIS HELP YOU FIX YOU ERROR
Re: Losse indentation warning -
arathin - 04.03.2012
actually i forgot about the pragma do what he said
Re: Losse indentation warning -
JJB562 - 04.03.2012
You could also use TidyPawn. It will fix all your loose indentations.
http://dracoblue.net/tidy/pawn/
EDIT: I read your post again and found out that you have tried this already. You should go with the other guys and use:
Re: Losse indentation warning -
Twisted_Insane - 04.03.2012
#pragma tabsize 0
Re: Losse indentation warning -
Ash. - 04.03.2012
Using
is a cheat way of doing this. You will find your code much more readable if you actually indent your code correctly.
Example:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(playerid == 0)
{
SendClientMessage(playerid, COLOUR_RED, "You're playerid 0!");
}
}
...is much more readable than:
pawn Код:
public OnPlayerSpawn(playerid)
{
if(playerid == 0)
{
SendClientMessage(playerid, COLOUR_RED, "You're playerid 0!");
}
}
Re: Losse indentation warning -
Boooth - 04.03.2012
Funky, how the hell is it a 'cheat way'. He may not worry about the structure of his script. Do please don't say that pragma tabsize is a cheat way around it.
Re: Losse indentation warning -
Ash. - 04.03.2012
Quote:
Originally Posted by Boooth
Funky, how the hell is it a 'cheat way'. He may not worry about the structure of his script. Do please don't say that pragma tabsize is a cheat way around it.
|
Well it is. A tab size (indentation) warning is there for a reason. The tabsize is set at 4 for SA-MP scripts, however PAWN scripts in general follow a tabsize setting of 8. This is there for a reason, otherwise they wouldn't have bothered at all.