Enum- error
#1

Hey guys.

Код:
enum vehgroupdata
{
    vgprice,
    vgname[2][156]
}
new VehicleGroups[VEHICLE_GROUPS][vehgroupdata] = {
    {7500, {"Bicycles", "Zweirдder"}},
    {100000, {"Cabrios", "Cabrios"}},
    {50000, {"Industrials", "Industriefahrzeuge"}},
    {75000, {"Lowrider", "Lowrider"}},
    {50000, {"Offroad vehicles", "Offroad Fahrzeuge"}},
    {150000, {"Public service vehicles", "Oeffentliche Servicefahrzeuge"}},
    {10000, {"RC-Models", "RC-Modelle"}},
    {40000, {"Midsize cars", "Mittelklassewagen"}},
    {120000, {"Sportcars", "Sportwagen"}},
    {60000, {"Vans & co.", "Kombis"}},
    {5000, {"Trailers", "Anhдnger"}},
    {200000, {"Airplanes", "Flugzeuge"}},
    {150000, {"Helicopters", "Helikopter"}},
    {75000, {"Other", "Sonstige"}}
};
Код:
(3) error 001: expected token: "}", but found "["
(7)  warning 228: length of initialler exceeds size of the enum field
(7)  error 018: initialization data exceeds declared size
What's the problem ? :/

Gz
Reply
#2

Quote:
Originally Posted by Shadow_Gengar
Посмотреть сообщение
Код:
enum vehgroupdata
{
    vgprice,
    vgname[2][156]
}
i also dont really know but try..

pawn Код:
enum vehgroupdata
{
    vgprice,
    vgname[24],
}
Reply
#3

Except the first error it stays the same.
Reply
#4

pawn Код:
new VehicleGroups[VEHICLE_GROUPS][vehgroupdata] = {
    {7500, "Bicycles", "Zweirдder"},
    {100000, "Cabrios", "Cabrios"},
    {50000, "Industrials", "Industriefahrzeuge"},
    {75000, "Lowrider", "Lowrider"},
    {50000, "Offroad vehicles", "Offroad Fahrzeuge"},
    {150000, "Public service vehicles", "Oeffentliche Servicefahrzeuge"},
    {10000, "RC-Models", "RC-Modelle"},
    {40000, "Midsize cars", "Mittelklassewagen"},
    {120000, "Sportcars", "Sportwagen"},
    {60000, "Vans & co.", "Kombis"},
    {5000, "Trailers", "Anhдnger"},
    {200000, "Airplanes", "Flugzeuge"},
    {150000, "Helicopters", "Helikopter"},
    {75000, "Other", "Sonstige"}
};
Reply
#5

EDIT: ok riddick answerd..
Reply
#6

I knew I can do it that way, but the other one would be better.
But thanks.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)