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

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

280: {"1410.1044", "-1305.7026", "9.3780", "Downtown Los Santos"},
all code

new pumpkins[][4] = {
{"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"}
};
Reply
#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
#3

The second option is correct
Reply
#4

C:\Users\Jimmi\Desktop\Server\93.119.25.182-7777\gamemodes\RunStrike.pwn(9555) : error 035: argument type mismatch (argument 2)
Hear
tmp_obj = CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);
Reply
#5

Removed
Reply
#6

Quote:
Originally Posted by Jimmi
View Post
C:\Users\Jimmi\Desktop\Server\93.119.25.182-7777\gamemodes\RunStrike.pwn(9555) : error 035: argument type mismatch (argument 2)
Hear
tmp_obj = CreateObject(19320,pumpkins[p][0],pumpkins[p][1],pumpkins[p][2],0,0,0);
Like this:
pawn Code:
tmp_obj = CreateObject(19320,pumpkins[p][pX],pumpkins[p][pY],pumpkins[p][pZ],0,0,0);
Reply
#7

Done.Thanks.
Reply
#8

Can you plz with my code? (line 20)

#include <a_samp>
#include <core>
#include <float>

new glob0[500];

new Text:glob7D0[500];

new Text:globFA0[500];

new Text:glob1770[500];

new Text:glob1F40[500];

new Text:glob2710[500];

new Float:glob2EE0[500][3];

new glob4E20[212][1] = {
"Jeep Wagoneer",
"Mercury Cougar",
"Camaro with Scoop",
"Big Rig",
"Jeep Grand Wagoneer",
"BMW 7-Series",
"Dumptruck",
"SA Firetruck",
"Peterbuilt",
"Lincoln Towncar",
"Dodge Aries",
"Acura NSX '05",
"Chevy Biscayne",
"Ford Aerostar",
"Ford Box Van",
"Ferrari Testarosso",
"Ford Econoline",
"Emergency Heli",
"Chevrolet Astrovan",
"Cadillac Eldorado",
"Chevy Caprice",
"Lincoln Mark 7",
"Chevrolet S10",
"Chevy Ice Cream Truck",
"Volkswagen Beach Buggy",
"AH-64A",
"Chevrolet Caprice",
"International SWAT Van",
"Securita Van",
"Dodge Viper",
"Preditor",
"Volvo Bus",
"M1A1 Abrams",
"Barracks",
"Ford Hot Rod",
"Trailer",
"Nissan Pulsar",
"Old Coach",
"Caprice Classic Cab",
"Ford Mustang Mach 1",
"Mercedes Van",
"RC Bandit",
"Cadillac Hearse",
"Packer/Stunt Helper",
"Chevy S-10 Monster Truck",
"Mercedes-Benz S-Class",
"Chris Craft Stinger",
"Bell 47G",
"Piaggio Vespa PX 200",
"Tram",
"Trailer",
"Ferrari F40",
"Go-Fast Boat",
"Orca",
"Sea Ray 270 Sedan Bridge",
"Flatbed",
"1992 Ford F800",
"Golf Car",
"Ford Taurus Wagon",
"Honda Life '74",
"Cessna 150 With Floats",
"Honda CBR 600 '92",
"Piaggio Vespa PX 200 '86",
"Harley Davidson Soft Tail",
"RC Red Baron",
"RC Raider",
"Dodge Dart",
"Plymouth Belverdere",
"Yamaha DT 200 Dirt Bike",
"Bell 47G",
"Hummer H-1",
"Honda TRX250x '92",
"Coastguard Boat",
"Rescue Boat",
"Mercury '51",
"Chevy Chevelle",
"Curtiss P-40D Warhawk",
"Mazda RX-7",
"Chevy Farm Truck",
"Chevy Caprice Estate",
"Porsche 911",
"Schwinn BMX",
"Dodge Ramvan",
"Volkswagen Bus",
"Endeavour 42",
"Equitech M40 '85",
"Bulldozer",
"Bell 206L-4",
"Bell 206B-3",
"Ford Bronco",
"Chevrolet Suburban '92",
"Lincoln Mark 7",
"Dodge Diplomat",
"CMN Interceptor DV-15",
"Ford Mustang LX",
"Ford Bronco",
"Honda CRX",
"Bell 206L-4",
"Chevy Cargo Van",
"Ford Moving Van",
"Jeep Wrangler",
"RC Heli",
"Ford Mustang LX '86",
"Ford Mustang LX '86",
"Customised Glendale",
"Ford Bronco '80",
"Mitsubishi 3000 GT",
"Buick Roadmaster",
"GMC R.V.",
"Old Bike",
"Schwinn Mesa Mountain Hardtail",
"C-2 Greyhound",
"Grumman G-164 AgCat",
"Pitt's Special",
"Gas Tanker",
"International 9370 Truck",
"Lincoln Towncar",
"Chevy Monte Carlo",
"Chevrolet Monte Carlo",
"Bombardier Learjet 55",
"AV-8 Harrier Jump-Jet",
"Honda CBR 900 RR Fireblade",
"Honda NSR 500 '01",
"Kawasaki KZ1000-P21",
"Chevrolet Cement Truck",
"Tow Truck '91",
"Ford Thunderbird",
"Ford Escort",
"CSI/FBI Investigation Truck",
"Dodge Dynasty",
"Forklift '89",
"Old Tractor",
"Combine Harvester",
"Mercedes-Benz SL-Class",
"Lincoln Mark 5",
"Chevy CST '68",
"Chevrolet Caprice Droptop",
"1972 EMD SD40",
"Amtrak F40PH",
"Hovercraft",
"Mercedes Benz E120",
"Ford GT-40",
"Chevy Nova",
"Dodge 100 Series",
"SA Firetruck",
"Ford Hotrod",
"Chevrolet Lumina",
"Oldsmobile Cutlass Ciera",
"Sikorsky CH-53",
"Dodge Roadrunner",
"Late 80's Honda Sedan",
"Mercury Grand Marquis",
"Chevy 2500",
"Douglas C-47",
"GMC Sierra",
"Jaguar XKE '66",
"Chevy S-10 Monster Truck",
"Chevy S-10 Monster Truck",
"Eagle Talon",
"Toyota Supra",
"Impreza 2.5RS '95",
"Honda Accord Wagon",
"Nissan R34 Skyline",
"Sikorsky UH-60 Black Hawk",
"RC Tiger",
"Honda Civic",
"Oldsmobile Cutlass",
"Chevy Impala",
"Half Life 2 Sand Rail",
"EMD SD40",
"Trailer",
"Go Kart",
"Ride-On Lawn Mower",
"Mercedes-Benz AK 4x4 '91",
"Elgin Pelican",
"Caddilac '54",
"Chevy Bel Air '57",
"Boeing 737",
"Flatbed",
"Range Rover",
"Rolls Royce",
"Honda VFR 400",
"Dodge Ramvan Newsvan",
"Baggage Tow Tractor HTAG-30/40",
"Trailer",
"Infinity J30 '92",
"Honda Goldwing GL1500 '04",
"Nissan 350Z/240SX",
"Hotdog Van",
"Volkswagen Golf",
"Trailer",
"Trailer",
"Lockheed C-5 Galaxy",
"Cessna 150",
"WTF u shouldnt drive this",
"CMN Interceptor DV-15",
"Chevy Caprice LA",
"Chevy Caprice SF",
"Chevy Caprice LV",
"Chevy Blazer Desert",
"Chevrolet El Camino '68",
"S.W.A.T. Van",
"Dodge Stealth '91",
"Pontiac Trans AM",
"Dodge Dart",
"Dodge 100 Series",
"Luggage Trailer",
"Luggage Trailer",
"Stair Trailer",
"Chevy Cargo Van",
"Farm Plow",
"Chevy 2500 Trailer"
};

thx
Reply
#9

Code:
Can you plz with my code? (line 20)

#include <a_samp>
#include <core>
#include <float>

new glob0[500];

new Text:glob7D0[500];

new Text:globFA0[500];

new Text:glob1770[500];

new Text:glob1F40[500];

new Text:glob2710[500];

new Float:glob2EE0[500][3];

new glob4E20[212][1] = {
        "Jeep Wagoneer",
	"Mercury Cougar",
	"Camaro with Scoop",
	"Big Rig",
	"Jeep Grand Wagoneer",
	"BMW 7-Series",
	"Dumptruck",
	"SA Firetruck",
	"Peterbuilt",
	"Lincoln Towncar",
	"Dodge Aries",
	"Acura NSX '05",
	"Chevy Biscayne",
	"Ford Aerostar",
	"Ford Box Van",
	"Ferrari Testarosso",
	"Ford Econoline",
	"Emergency Heli",
	"Chevrolet Astrovan",
	"Cadillac Eldorado",
	"Chevy Caprice",
	"Lincoln Mark 7",
	"Chevrolet S10",
	"Chevy Ice Cream Truck",
	"Volkswagen Beach Buggy",
	"AH-64A",
	"Chevrolet Caprice",
	"International SWAT Van",
	"Securita Van",
	"Dodge Viper",
	"Preditor",
	"Volvo Bus",
	"M1A1 Abrams",
	"Barracks",
	"Ford Hot Rod",
	"Trailer",
	"Nissan Pulsar",
	"Old Coach",
	"Caprice Classic Cab",
	"Ford Mustang Mach 1",
	"Mercedes Van",
	"RC Bandit",
	"Cadillac Hearse",
	"Packer/Stunt Helper",
	"Chevy S-10 Monster Truck",
	"Mercedes-Benz S-Class",
	"Chris Craft Stinger",
	"Bell 47G",
	"Piaggio Vespa PX 200",
	"Tram",
	"Trailer",
	"Ferrari F40",
	"Go-Fast Boat",
	"Orca",
	"Sea Ray 270 Sedan Bridge",
	"Flatbed",
	"1992 Ford F800",
	"Golf Car",
	"Ford Taurus Wagon",
	"Honda Life '74",
	"Cessna 150 With Floats",
	"Honda CBR 600 '92",
	"Piaggio Vespa PX 200 '86",
	"Harley Davidson Soft Tail",
	"RC Red Baron",
	"RC Raider",
	"Dodge Dart",
	"Plymouth Belverdere",
	"Yamaha DT 200 Dirt Bike",
	"Bell 47G",
	"Hummer H-1",
	"Honda TRX250x '92",
	"Coastguard Boat",
	"Rescue Boat",
	"Mercury '51",
	"Chevy Chevelle",
	"Curtiss P-40D Warhawk",
	"Mazda RX-7",
	"Chevy Farm Truck",
	"Chevy Caprice Estate",
	"Porsche 911",
	"Schwinn BMX",
	"Dodge Ramvan",
	"Volkswagen Bus",
	"Endeavour 42",
	"Equitech M40 '85",
	"Bulldozer",
	"Bell 206L-4",
	"Bell 206B-3",
	"Ford Bronco",
	"Chevrolet Suburban '92",
	"Lincoln Mark 7",
	"Dodge Diplomat",
	"CMN Interceptor DV-15",
	"Ford Mustang LX",
	"Ford Bronco",
	"Honda CRX",
	"Bell 206L-4",
	"Chevy Cargo Van",
	"Ford Moving Van",
	"Jeep Wrangler",
	"RC Heli",
	"Ford Mustang LX '86",
	"Ford Mustang LX '86",
	"Customised Glendale",
	"Ford Bronco '80",
	"Mitsubishi 3000 GT",
	"Buick Roadmaster",
	"GMC R.V.",
	"Old Bike",
	"Schwinn Mesa Mountain Hardtail",
	"C-2 Greyhound",
	"Grumman G-164 AgCat",
	"Pitt's Special",
	"Gas Tanker",
	"International 9370 Truck",
	"Lincoln Towncar",
	"Chevy Monte Carlo",
	"Chevrolet Monte Carlo",
	"Bombardier Learjet 55",
	"AV-8 Harrier Jump-Jet",
	"Honda CBR 900 RR Fireblade",
	"Honda NSR 500 '01",
	"Kawasaki KZ1000-P21",
	"Chevrolet Cement Truck",
	"Tow Truck '91",
	"Ford Thunderbird",
	"Ford Escort",
	"CSI/FBI Investigation Truck",
	"Dodge Dynasty",
	"Forklift '89",
	"Old Tractor",
	"Combine Harvester",
	"Mercedes-Benz SL-Class",
	"Lincoln Mark 5",
	"Chevy CST '68",
	"Chevrolet Caprice Droptop",
	"1972 EMD SD40",
	"Amtrak F40PH",
	"Hovercraft",
	"Mercedes Benz E120",
	"Ford GT-40",
	"Chevy Nova",
	"Dodge 100 Series",
	"SA Firetruck",
	"Ford Hotrod",
	"Chevrolet Lumina",
	"Oldsmobile Cutlass Ciera",
	"Sikorsky CH-53",
	"Dodge Roadrunner",
	"Late 80's Honda Sedan",
	"Mercury Grand Marquis",
	"Chevy 2500",
	"Douglas C-47",
	"GMC Sierra",
	"Jaguar XKE '66",
	"Chevy S-10 Monster Truck",
	"Chevy S-10 Monster Truck",
	"Eagle Talon",
	"Toyota Supra",
	"Impreza 2.5RS '95",
	"Honda Accord Wagon",
	"Nissan R34 Skyline",
	"Sikorsky UH-60 Black Hawk",
	"RC Tiger",
	"Honda Civic",
	"Oldsmobile Cutlass",
	"Chevy Impala",
	"Half Life 2 Sand Rail",
	"EMD SD40",
	"Trailer",
	"Go Kart",
	"Ride-On Lawn Mower",
	"Mercedes-Benz AK 4x4 '91",
	"Elgin Pelican",
	"Caddilac '54",
	"Chevy Bel Air '57",
	"Boeing 737",
	"Flatbed",
	"Range Rover",
	"Rolls Royce",
	"Honda VFR 400",
	"Dodge Ramvan Newsvan",
	"Baggage Tow Tractor HTAG-30/40",
	"Trailer",
	"Infinity J30 '92",
	"Honda Goldwing GL1500 '04",
	"Nissan 350Z/240SX",
	"Hotdog Van",
	"Volkswagen Golf",
	"Trailer",
	"Trailer",
	"Lockheed C-5 Galaxy",
	"Cessna 150",
	"WTF u shouldnt drive this",
	"CMN Interceptor DV-15",
	"Chevy Caprice LA",
	"Chevy Caprice SF",
	"Chevy Caprice LV",
	"Chevy Blazer Desert",
	"Chevrolet El Camino '68",
	"S.W.A.T. Van",
	"Dodge Stealth '91",
	"Pontiac Trans AM",
	"Dodge Dart",
	"Dodge 100 Series",
	"Luggage Trailer",
	"Luggage Trailer",
	"Stair Trailer",
	"Chevy Cargo Van",
	"Farm Plow",
	"Chevy 2500 Trailer"
};

thx
new glob4E20[212][1] = {

>

new glob4E20[][] = {
Reply
#10

Crayder, I tried thet, it doesn't say there's error, but my status bar is glitched
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)