break and return
#1

Here I`m again..
Now with small problem but will be nice to know.
How could i stop script (return) and use break in one time?
Reason is, i want to stop forwarded script and break a loop.

pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
        {
            if(HouseInfo[h][hOwned] == 1)
            {
                if(HouseInfo[h][hRentabil] == 0)
                {
                    //script
                }
                else
                {
                    //script
                }
            }
            else
            {
                 // script
            }
            break; // here i want to break and return to not allow next loop
        }
    }
    for(new h = 0; h < sizeof(SBizzInfo); h++)
    {
`break; // here i want to break and return something to not allow next loop`
How would i do that in my case?

Tried things like:
pawn Код:
return break;
//---
break;
return 1;
//----
Reply


Messages In This Thread
break and return - by GaGlets(R) - 27.12.2010, 04:16
Re: break and return - by 1337connor - 27.12.2010, 04:21
Re: break and return - by GaGlets(R) - 27.12.2010, 04:25
Re: break and return - by randomkid88 - 27.12.2010, 04:32
Re: break and return - by GaGlets(R) - 27.12.2010, 04:37
Re: break and return - by randomkid88 - 27.12.2010, 04:42
Re: break and return - by GaGlets(R) - 27.12.2010, 11:48
Re: break and return - by FUNExtreme - 27.12.2010, 11:54
Re: break and return - by GaGlets(R) - 27.12.2010, 12:03
Re: break and return - by iggy1 - 27.12.2010, 12:06

Forum Jump:


Users browsing this thread: 1 Guest(s)