(280) : error 018: initialization data exceeds declared size
#2

Are you sure you want all of these to be strings? You can store the floats and strings in one array using an enumerator.

First off I'll explain what the error is about. You have a basic 2 dimensional array. You have an undetermined number of arrays in the first dimension and 4 cells in each of those. In each of those undetermined cells you're the second dimensional arrays. In the second dimension arrays you are trying to store strings. The strings do not have a set size. For your code to work as-is with strings, do this:
pawn Code:
new pumpkins[][4][32] = {
{"1410.1044", "-1305.7026", "9.3780", "Downtown Los Santos"},
{"811.0631", "-1098.3042", "25.9063", "CNN Los Santos"},
{"395.0076", "-1892.1541", "7.8301", "Santa Maria Beach"},
{"1208.2128", "-1997.4165", "69.0078", "Verdant Bluffs"},
{"1291.9706", "-788.6403", "96.4609", "Mulholland"},
{"1319.6095", "1254.3007", "14.2731", "Las Venturas Airport"},
{"2000.8856", "1565.8356", "15.3672", "The Strip"},
{"2592.7739", "2790.8081", "10.8203", "KACC Military Fuels"},
{"1058.6401", "1260.5609", "10.8203", "Blackfield"},
{"1697.7155", "679.0499", "14.8222", "Randolph Ind. Estate"},
{"2206.8350", "1286.4581", "10.8203", "The Camel's Toe"},
{"2060.2539", "-2376.2620", "16.1250", "LS International"},
{"2505.8127", "-1693.7687", "13.5579", "Ganton"},
{"1883.6287", "1990.4550", "7.5946", "Redsands East | The Visage"}
};
Or more properly, with floats and strings in the second dimension:
pawn Code:
enum E_PUMP {Float:pX, Float:pY, Float:pZ, pStr[32]}
new pumpkins[][E_PUMP] = {
    {1410.1044, -1305.7026, 9.3780,     "Downtown Los Santos"},
    {811.0631-1098.3042, 25.9063,    "CNN Los Santos"},
    {395.0076-1892.1541, 7.8301,     "Santa Maria Beach"},
    {1208.2128, -1997.4165, 69.0078,    "Verdant Bluffs"},
    {1291.9706, -788.640396.4609,    "Mulholland"},
    {1319.6095, 1254.300714.2731,    "Las Venturas Airport"},
    {2000.8856, 1565.835615.3672,    "The Strip"},
    {2592.7739, 2790.808110.8203,    "KACC Military Fuels"},
    {1058.6401, 1260.560910.8203,    "Blackfield"},
    {1697.7155, 679.0499,   14.8222,    "Randolph Ind. Estate"},
    {2206.8350, 1286.458110.8203,    "The Camel's Toe"},
    {2060.2539, -2376.2620, 16.1250,    "LS International"},
    {2505.8127, -1693.7687, 13.5579,    "Ganton"},
    {1883.6287, 1990.45507.5946,     "Redsands East | The Visage"}
};
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)