Warning + A Question
#8

It's bad practise to write things all on one line. It looks very messy and can become confusing.

Compare:
pawn Code:
if(IsPlayerAdmin(playerid)) { pAdmin[playerid] = 1; } else { pAdmin[playerid] = 0; }
pawn Code:
if(IsPlayerAdmin(playerid))
{
    pAdmin[playerid] = 1;
}
else
{
    pAdmin[playerid] = 0;
}
Even though for this you should do:
pawn Code:
pAdmin[playerid] = IsPlayerAdmin(playerid);
But that's not relevant, I just couldn't think of another simple example.
Reply


Messages In This Thread
Warning + A Question - by nuriel8833 - 02.02.2012, 11:16
Re: Warning + A Question - by Wesley221 - 02.02.2012, 11:20
Re: Warning + A Question - by T0pAz - 02.02.2012, 11:21
Re: Warning + A Question - by nuriel8833 - 02.02.2012, 11:23
Re: Warning + A Question - by SampLoverNo123 - 02.02.2012, 11:27
Re: Warning + A Question - by Wesley221 - 02.02.2012, 11:30
Re: Warning + A Question - by nuriel8833 - 02.02.2012, 11:34
Re: Warning + A Question - by MP2 - 02.02.2012, 11:39
Re: Warning + A Question - by nuriel8833 - 02.02.2012, 11:43
Re: Warning + A Question - by [Diablo] - 02.02.2012, 12:22
Re: Warning + A Question - by nuriel8833 - 02.02.2012, 12:35
Re: Warning + A Question - by Tannz0rz - 02.02.2012, 13:07

Forum Jump:


Users browsing this thread: 5 Guest(s)