SA-MP Forums Archive
Command Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command Problem (/showthread.php?tid=452840)



Command Problem - San1 - 22.07.2013

No Errors - It Says The Business is Owned When its not even bought yet - Everything confirms its not bought - This command says its already bought - can sum1 plz help me ?
pawn Код:
CMD:buybiz(playerid, params[])
{
    for(new biz = 0; biz < MAX_BIZ; biz++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[biz][ex], BizInfo[biz][ey], BizInfo[biz][ez]))
        {
            if(PlayerInfo[playerid][BizID] == 0)
            {
                if(BizInfo[biz][Owned] == 1)
                {
                    new string[128], string2[128], pname[MAX_PLAYER_NAME];
                    BizInfo[biz][Owned] = 1;
                    BizInfo[biz][Owner] = GetPlayerName(playerid, pname, sizeof(pname));
                    PlayerInfo[playerid][BizID] = biz;
                    format(string2, sizeof(string2), BPATH, biz);
                    INI_ParseFile(string2,"LoadBiz_%s", .bExtra = true, .extra = biz);
                    format(string, sizeof(string),"You Have Bought Business ID (%d)", biz);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You already own a business");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "This business is already Owned");
            }
        }
    }
    return 1;
}



Re: Command Problem - IceCube! - 22.07.2013

your reloading the file AFTER you alter a variable, either save before you reload (Which I will state isn't needed as in Reloading).

Quick Fix (Remove InI_PraseFile


Re: Command Problem - San1 - 22.07.2013

Didnt work at all