Compile Error 029 and Error 008
#1

C:\Users\Jaagup\Desktop\WORLD WAR III (build 5)\gamemodes\wwIII.pwn(240) : error 029: invalid expression, assumed zero
C:\Users\Jaagup\Desktop\WORLD WAR III (build 5)\gamemodes\wwIII.pwn(240) : error 008: must be a constant expression; assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

I get the above errors when trying to compile a script. The code itself looks like this:

Код:
new gCaptureZone[] [CaptureZoneEnum] =
{
	//zone name     			//minX      	//minY      	//maxX      	//maxY      	//owner //CPx       	//CPy       	//CPz       //others - not to be changed
	{"Big Ear", 				-420.4035,		1471.412,		-245.2354, 		1646.58,		0,		-298.1169,		1538.4077,		75.5625,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Desert Airport", 			163.4902, 		2382.287,		467.115, 		2627.522,		0,		384.8239,		2535.1963,		16.5391,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Embassy", 				969.2637, 		945.9079,		1179.465, 		1156.11,		0,		1050.5947,		1011.1202,		11.0000,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Area51", 					81.74512, 		1763.359,		326.9805, 		1973.561,		1,		254.7359,		1802.2224,		7.4411,    	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Gas Station", 			517.8044, 		1639.581,		689.6177, 		1759.491,		1,		671.8925,		1705.6340,		7.1875,    	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Abandoned Settlement", 	-478.7929, 		2160.407,		-338.6584, 		2277.186,		1,		-422.8697,		2227.8984,		42.4297,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Beach Shack", 			213.8855,		2853.3789,		298.1382,		2946.1755,		2,		259.7926,		2889.9695,		11.1329,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Oil Pump", 				1015.975, 		2861.08, 		1097.72, 		2977.858,		2,		1048.8944,		2907.4792,		47.8231,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Oil Refinery", 			81.74512, 		1307.922,		280.269, 		1494.768,		2,		220.3940,		1423.1903,		10.5859,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Shooting Range", 			759.0619, 		1658.258,		840.807, 		1716.648,		3,		791.0085,		1676.8516,		5.2813,    	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Snake Farm", 				-65.2373,		2311.1003,		10.0603,		2393.9177,		3,		-25.3876,		2346.2954,		24.1347,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Cluckin Bell", 			-1249.533, 		1763.359,		-1144.432, 		1868.46,		3,		-1195.8038,		1814.1815,		41.8190,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Motel", 					-802.8551,		2720.7478,		-741.8143,		2777.7239,		4,		-782.1253,		2751.1729,		45.6628,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Electronics Grid", 		-1845.104, 		1950.205,		-1786.715, 		2090.34,		4,		-1820.7186,		2051.1123,		9.4018,    	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Jays Diner", 				-1985.239, 		2300.542,		-1903.494, 		2405.642,		4,		-1949.5081,		2395.0173,		49.5000,   	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Spread Ranch", 			668.1707,		1920.2765,		732.9704,		2021.4883,		5,		681.7109,		1947.3749,		5.5391,    	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Caravan Park", 			-46.0147,		1325.4503,		48.4686,		1414.3330,		5,		-8.5448,		1394.0792,		9.1719,   	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Quarry", 					502.1487, 		782.4177, 		735.7062, 		934.23,			5,		620.5497,		859.8751,		-42.9534,   NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Mountain Outpost", 		-842.8987,		2264.4333, 		-654.6287,		2454.2888,		6,		-720.1762,		2338.0137,		126.3180,   NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},//mountain outpost
	{"Bait Shop", 				-1403.6534,		2042.1500,		-1320.6107,		2148.6382,		6,		-1376.0591,		2108.4932,		42.2000,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Farmville", 				-735.7062, 		852.4849, 		-607.2495, 		1004.297,		6,		-688.0816,		937.4944,		13.6328,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Cargo Ship", 				-1494.768, 		1448.057, 		-1319.6, 		1529.802,		7,		-1468.1112,		1488.9058,		8.2501,   	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Bio Ship", 				-2534.099, 		1494.768, 		-2253.83, 		1599.869,		7,		-2471.2327,		1538.4662,		33.2344,   	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Fire Department", 		-572.0619,		2528.5586,		-491.7644,		2646.3560,		7,		-550.6154,		2593.6748,		53.9348,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},//25
	{"Black Market", 			-341.4373,		1714.3163,		-264.2661,		1842.1420,		7,		-317.9809,		1758.1349,		42.7524,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Fuel Depot", 				540.2973,		1165.4449,		694.1926,		1308.1895,		1,		589.7242,		1243.9127,		11.7188,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Las Venturas Airport", 	1267.5743,		1363.3995,		1520.3319,		1780.0334,		2,		1315.6771,		1588.1575,		10.8203,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Ghost Ship", 				-562.3872,		361.8078,		-264.1497,		455.0224,		3,		-485.4115,		423.5143,		32.1677,   	NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
	{"Shipment", 				-870.5328,      2707.4441,      -949.3828,      2719.2466,      4,      -912.6208,      2686.2710,      42.3703,    NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
}; - line 240
I'm trying to edit a ready-made TDM script by Gammix, but since I can't even be called a beginner at Pawno and scripting in general, I haven't really figured out what the problem in line 240 might be. I'm attempting to edit a zone, and this error keeps popping up when trying to compile. Hence I'm seeking help from here.

Thanks in advance.
Reply
#2

Write something inside [] like [0] or just delete it its not needed
Reply
#3

Tried both options, neither worked. It was like that ever since I downloaded the script and it hadn't caused any problems before.
Reply
#4

You are either missing character or you have character that shouldn't be there. Which line exactly is 240?
Reply
#5

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
You are either missing character or you have character that shouldn't be there. Which line exactly is 240?
The final line, that says
Код:
};
Reply
#6

Line before that, you have comma, delete it. If it's last item in list you never put comma.

Ex. item1,item2,item3,. - Doesn't make much sense.
Reply
#7

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Line before that, you have comma, delete it. If it's last item in list you never put comma.

Ex. item1,item2,item3,. - Doesn't make much sense.
Worked, thanks for helping a rookie out
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)