26.06.2018, 11:56
The problem with the code above is readability. If you indent your code, you will notice that you never close bracket for each dialog so your current code indented is like this:
If I were you, I would get rid of bProductPriceN constant in enumerator and it would be like this:
Much simpler.
pawn Код:
if( dialogid == 15786)
{
if( dialogid == 15787)
{
if( dialogid == 15788)
{
...
pawn Код:
new gBizz_ProductPrice[MAX_BIZZ][8];
pawn Код:
if (15786 <= dialogid <= 15793)
{
if (response)
{
// check if value of PlayerInfo[playerid][pPBiskey] is not out of bounds (0 <= value < sizeof BizzInfo)
// before you use it in BizzInfo array
new product_price = strval(inputtext);
if (product_price < 1) return SendClientMessageEx(playerid, COLOR_WHITE, "EROR: Tidak boleh menggunakan - .");
gBizz_ProductPrice[PlayerInfo[playerid][pPBiskey]][dialogid - 15786] = product_price;
}
return 1;
}