for() Causing my server to stop responding
#1

pawn Код:
stock SetBizToPlayer(playerid, idx)
{
    new freespot;
    for(new b=0;b<MAX_PLAYERBIZ;idx++)
    {
        if(PlayerInfo[playerid][pBiz][b] < 1)
        {
            freespot = b;
        }
    }
    PlayerInfo[playerid][pBiz][freespot] = idx;
    return 1;
}
I use this in a command like /buybiz, It works for the first business slot. Then anything after that it crashes the server. The server stops responding and no commands work. Any help?

MAX_PLAYERBIZ = 3
idx = BizID Number
Reply


Messages In This Thread
for() Causing my server to stop responding - by NewCityRoleplay - 06.04.2014, 12:40
Re: for() Causing my server to stop responding - by Konstantinos - 06.04.2014, 12:46
Re: for() Causing my server to stop responding - by Vince - 06.04.2014, 13:25
Re: for() Causing my server to stop responding - by NewCityRoleplay - 06.04.2014, 14:05

Forum Jump:


Users browsing this thread: 3 Guest(s)