debug help
#5

The mistake is in this line:
pawn Код:
if (strcmp(BizInfo[i][bOwner], pName(playerid), false) == 0) return SendClientMessage(playerid, 0xDC143CAA, "ERROR: You Already own this business");
If player is not on biz icon to buy it, "i" will be -255 and there is no checking before the line I mentioned. So you need to move this line:
pawn Код:
if(i == -255) return SendClientMessage(playerid,-1,"ERROR: You need to be on biz icon to bought it");
on top and be like this:
pawn Код:
new i = GetBizID(playerid);
if(i == -255) return SendClientMessage(playerid,-1,"ERROR: You need to be on biz icon to bought it");
if (strcmp(BizInfo[i][bOwner], pName(playerid), false) == 0) return SendClientMessage(playerid, 0xDC143CAA, "ERROR: You Already own this business");
Reply


Messages In This Thread
debug help - by nbx2000 - 16.06.2018, 22:16
Re: debug help - by Mike861 - 16.06.2018, 22:35
Re: debug help - by kovac - 17.06.2018, 01:09
Re: debug help - by nbx2000 - 17.06.2018, 01:43
Re: debug help - by Calisthenics - 17.06.2018, 09:34
Re: debug help - by CodeStyle175 - 17.06.2018, 09:35
Re: debug help - by jasperschellekens - 17.06.2018, 09:59

Forum Jump:


Users browsing this thread: 2 Guest(s)