SA-MP Forums Archive
Error help. - 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: Error help. (/showthread.php?tid=278970)



Error help. - iGetty - 24.08.2011

Code:
(12533) : warning 213: tag mismatch
(12533) : error 033: array must be indexed (variable "Businesses")
(12534) : error 001: expected token: "]", but found "["
(12534) : error 029: invalid expression, assumed zero
(12534) : error 029: invalid expression, assumed zero
(12534) : fatal error 107: too many error messages on one line
pawn Code:
Player[i][Money] += Businesses[Player[playerid][bPay]];
format(string, sizeof(string), "Payout for business %s, %i.", Businesses[Player[i][Business][bPay]]);
Top line is 12533. bottom line is 12534, please help.


Re: Error help. - =WoR=Varth - 24.08.2011

Show us your enum.


Re: Error help. - iGetty - 24.08.2011

pawn Code:
enum BusinessData
{
    Float: bExteriorX,
    Float: bExteriorY,
    Float: bExteriorZ,
    bExteriorID,
    Float: bInteriorX,
    Float: bInteriorY,
    Float: bInteriorZ,
    bInteriorID,
    bType,
    bVault,
    bPrice,
    bPay,
    bProductPrice1,
    bProductPrice2,
    bProductPrice3,
    bProductPrice4,
    bProductPrice5,
    bProductPrice6,
    bProductPrice7,
    SupplyStatus,
    bProductPrice8,
    bProductPrice9,
    bProductPrice10,
    bProductPrice11,
    bProductPrice12,
    bProductPrice13,
    bProductPrice14,
    bSupplies,
    bOwner[255],
    bSupplyStatus,
    bLockStatus,
    bPickupID,
    bName[255],
};
That there?


Re: Error help. - =WoR=Varth - 24.08.2011

Your Business variable?
Show us where you create Business variable.


Re: Error help. - iGetty - 24.08.2011

pawn Code:
new Businesses[MAX_BUSINESSES][BusinessData];
That, is what you meant?, sorry.