Loose Identation
#9

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;
    }
Reply


Messages In This Thread
Loose Identation - by 0_o - 28.07.2011, 18:42
Re: Loose Identation - by Mean - 28.07.2011, 18:45
Re: Loose Identation - by 0_o - 28.07.2011, 18:49
Re: Loose Identation - by PrawkC - 28.07.2011, 18:53
Re: Loose Identation - by Shockey HD - 28.07.2011, 18:57
Re: Loose Identation - by Mean - 28.07.2011, 18:59
Re: Loose Identation - by Kingunit - 28.07.2011, 19:51
Re: Loose Identation - by Kaperstone - 28.07.2011, 20:55
Re: Loose Identation - by M4z - 28.07.2011, 21:28
Re: Loose Identation - by Kaperstone - 28.07.2011, 21:44

Forum Jump:


Users browsing this thread: 3 Guest(s)