Loop stops suddenly
#1

I'm making something using Textdraws. It uses a loop to TextdrawSetString for 6 textdraws. It has to hide the ones which value = 0. Somehow the code below stops the loop after hiding only one of the textdraws. The loop stops unexpectedly. It should hide all the 6 textdraws.


pawn Код:
if(playertextid == call[playerid][16])
    {
        if(PlayerInfo[playerid][pPhone] == 1)
        {
            if(PlayerCallScreen[playerid] == 17)
            {
                PageNumber[playerid] += 1;
                for(new i = 0; i<6; i++)
                {
                    if(PlayerCallNumber[playerid][PageNumber[playerid]*6+i] == 0)
                    {
                        PlayerTextDrawHide(playerid, call[playerid][i+10]); // This get's called once and the whole loop stops
                    }
                    PlayerTextDrawSetString(playerid, call[playerid][i+10], PlayerCallName[playerid][PageNumber[playerid]*6+i]);
                }
            }
        }
    }
Reply


Messages In This Thread
Loop stops suddenly - by ||123|| - 06.11.2013, 18:12
Re: Loop stops suddenly - by Konstantinos - 06.11.2013, 18:18
Re: Loop stops suddenly - by ||123|| - 06.11.2013, 18:25
Re: Loop stops suddenly - by SuperViper - 06.11.2013, 21:01
Re: Loop stops suddenly - by ||123|| - 07.11.2013, 01:06
Re: Loop stops suddenly - by Emmet_ - 07.11.2013, 01:16
Re: Loop stops suddenly - by DeStunter - 07.11.2013, 01:41
Re: Loop stops suddenly - by ||123|| - 07.11.2013, 10:29

Forum Jump:


Users browsing this thread: 2 Guest(s)