Error in 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)
+--- Thread: Error in ENUM (
/showthread.php?tid=473258)
Error in ENUM -
newbie scripter - 02.11.2013
hi all i made an enum, but i got this error.
pawn Код:
new VehicleInfo [] [vInfo] =
{
{411, "Infernus", 1, 3, 1}, // ERROR LINE. i just added this for checking.
{531, "Tractor", 123, 126, 125}
};
ErrorCode: error 018: initialization data exceeds declared size
i havent declared any size, but only this ENUM.
pawn Код:
enum vInfo
{
CarId,
CarName,
SpeedRank,
AccelerationRank,
OverallRank
};
Re: Error in ENUM -
RajatPawar - 02.11.2013
You're trying to insert a string into an integer! (Carname -> "Infernus"), so carname has to be a string array.
Re: Error in ENUM -
Zex Tan - 02.11.2013
Like what Rajat said, CarName is a string, so you need to add the string in your enum.