Loop isn't working?
#8

I believe you're looking for something like this:

pawn Код:
for(new i = 1; i < MAX_HOUSES; i++)
    {
        if(strlen(HouseInfo[i][hAddress]) <= 1)//MAX HOUSES IS DEFINED, so the string length of the remaining houses = 0, so if they're all taken, house limit is full!
        {
            houseid = i;
            break;
        }
    }
    if(houseid == -1) return SendClientMessage(playerid, COLOUR_GREY, "House Limit Exceeded.");
What you're currently doing is creating the same thing for each house, aha!

Let me know if you need anything else.
Reply


Messages In This Thread
Loop isn't working? - by AphexCCFC - 14.04.2014, 07:02
Re: Loop isn't working? - by Lidor124 - 14.04.2014, 07:09
Re: Loop isn't working? - by AphexCCFC - 14.04.2014, 07:21
Re: Loop isn't working? - by Lidor124 - 14.04.2014, 07:23
Re: Loop isn't working? - by RajatPawar - 14.04.2014, 07:25
Re: Loop isn't working? - by AphexCCFC - 14.04.2014, 07:35
Re: Loop isn't working? - by AphexCCFC - 14.04.2014, 07:37
Re: Loop isn't working? - by Dokins - 14.04.2014, 11:12

Forum Jump:


Users browsing this thread: 3 Guest(s)