BUG with SelectTextDraw and OnPlayerKeyStateChange
#6

Quote:
Originally Posted by DartakousLien
Посмотреть сообщение
1. i use a perfect indentation, but here, can't appers a corret indentation in first line of code ...
Your indentation isn't WRONG (but it's far from perfect) - it's very hard to read.

Compare:


pawn Код:
if(oldkeys & KEY_WALK) {
    if(GetPVarInt(playerid,"problema")==10034) {
        SCMPOW(playerid,-1,"released");
        DeletePVar(playerid,"problema");
    }
    else {
        SCMPOW(playerid,-1,"release");
        CancelSelectTextDraw(playerid);
    }
}
else if(newkeys & KEY_WALK) {
    SCMPOW(playerid,-1,"press");
    SetPVarInt(playerid,"problema",10034);
    SelectTextDraw(playerid,COR_VERMELHO);
}



pawn Код:
if(oldkeys & KEY_WALK)
{
    if(GetPVarInt(playerid,"problema")==10034)
    {
        SCMPOW(playerid,-1,"released");
        DeletePVar(playerid,"problema");
    }
    else
    {
        SCMPOW(playerid,-1,"release");
        CancelSelectTextDraw(playerid);
    }
}
else if(newkeys & KEY_WALK)
{
    SCMPOW(playerid,-1,"press");
    SetPVarInt(playerid,"problema",10034);
    SelectTextDraw(playerid,COR_VERMELHO);
}
It's a LOT easier to see the individual code blocks when the braces ({ & }) are on their own lines.
Reply


Messages In This Thread
BUG with SelectTextDraw and OnPlayerKeyStateChange - by DartakousLien - 14.04.2013, 22:32
Re: BUG with SelectTextDraw and OnPlayerKeyStateChange - by MP2 - 15.04.2013, 00:07
Re: BUG with SelectTextDraw and OnPlayerKeyStateChange - by DaRk_RaiN - 15.04.2013, 19:50
Re: BUG with SelectTextDraw and OnPlayerKeyStateChange - by Basssiiie - 15.04.2013, 22:15
Re: BUG with SelectTextDraw and OnPlayerKeyStateChange - by DartakousLien - 15.04.2013, 23:52
Re: BUG with SelectTextDraw and OnPlayerKeyStateChange - by MP2 - 16.04.2013, 00:05

Forum Jump:


Users browsing this thread: 1 Guest(s)