Error with enum. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error with enum. (
/showthread.php?tid=81362)
Error with enum. -
Dreftas - 10.06.2009
pawn Код:
enum PropInfo
{
PropPrice[MAX_PROPERTIES],
PropName[MAX_PROPERTIES][56],
bool:Buyed[MAX_PROPERTIES],
Owner[MAX_PROPERTIES][MAX_PLAYER_NAME],
OwnerID[MAX_PROPERTIES],
}
new Prop[PropInfo];
Error
error 001: expected token: "}", but found "[" is here:
pawn Код:
PropName[MAX_PROPERTIES][56],
and here
pawn Код:
Owner[MAX_PROPERTIES][MAX_PLAYER_NAME],
How to fix this ?
Re: Error with enum. -
Andom - 10.06.2009
Quote:
Originally Posted by Dreftas
pawn Код:
enum PropInfo { PropPrice[MAX_PROPERTIES], PropName[MAX_PROPERTIES][56], bool:Buyed[MAX_PROPERTIES], Owner[MAX_PROPERTIES][MAX_PLAYER_NAME], OwnerID[MAX_PROPERTIES], } new Prop[PropInfo];
Error error 001: expected token: "}", but found "[" is here:
pawn Код:
PropName[MAX_PROPERTIES][56],
and here
pawn Код:
Owner[MAX_PROPERTIES][MAX_PLAYER_NAME],
How to fix this ?
|
try this:
pawn Код:
enum PropInfo
{
PropPrice,
PropName[56],
bool:Buyed,
Owner[MAX_PLAYER_NAME],
OwnerID
}
new Prop[MAX_PROPERTIES][PropInfo];
Because i think you cannot have more then 1 array in an enum array.
Re: Error with enum. -
Dreftas - 10.06.2009
Yup, thanks :] /lock.