Help 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: Help loose identation (
/showthread.php?tid=145045)
Help loose identation -
MasterB - 30.04.2010
i wrote this but it gives me a warning
warning 217 loose identation
Код:
if(strcmp(cmd, "/login", true) == 0)
{
if(logged[playerid] == 1) //checks if a player is logged in in his account
{
SendClientMessage(playerid, COLOR_RED, "You are already logged in!"); return 1;
}
else
{
if (dini_Exists(pname)) //checks of the player have already made an account
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not registered. Please register by using /register"); return 1;
}
}
return 1; //here it gives the warning
}
what did i do wrong?
Re: Help loose identation -
Virtual1ty - 30.04.2010
Well the warning pretty much tells you don't know how to (properly) indent your code.
pawn Код:
if(strcmp(cmd, "/login", true) == 0)
{
if(logged[playerid] == 1) //checks if a player is logged in in his account
{
SendClientMessage(playerid, COLOR_RED, "You are already logged in!"); return 1;
}
else
{
if(dini_Exists(pname)) //checks of the player have already made an account
{
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Login","Enter your password below:","Login","Cancel");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not registered. Please register by using /register"); return 1;
}
}
return 1;
}
Re: Help loose identation -
MasterB - 30.04.2010
thnx it fixed the warning
srry im pretty new to pawno
Re: Help loose identation -
RyDeR` - 30.04.2010
If you are new you can use temporary
at the top of your script.
But I recommend to learn .pwn with indentitation.
Re: Help loose identation -
smeti - 30.04.2010
http://dracoblue.net/tidy/pawn/