error 029 and error 010
#1

In my robbery checkpoints i have these codes to create checkpoint, but when i am trying to add another and also increasing the max robberies number, it is giving out this error!
Код:
E:\***\******/robberyCheckpoints.inc(85) : error 029: invalid expression, assumed zero
E:\***\********/robberyCheckpoints.inc(129) : error 010: invalid function or declaration
Complete Code:-
Код:
#define MAX_ROB_CHECKPOINT			(43)
forward placeAllCheckpoints();

enum robberyCheckpoints
{
	storeID,
	Float:enterpointLoc[3],
	Float:exitpointLoc[3],
	Float:robpointLoc[3],
	storeStatus,
	lowestCash,
	highestCash,
	virtualWorld,
	interiorWorld,
	storeName[25],
	lastRobbed,
	storePrice,
	storeOwner,
	Float:storeActorPos[4],
	storeActorSkin,
	storeActor,
	storeMoney
}

new checkpointData[MAX_ROB_CHECKPOINT][robberyCheckpoints] =
{
	/*
	    - storeID		- this is the store ID, continue the pattern.
		- checkpointLoc	- x, y, z location for entering the interior (this is also the place the player ends up being after leaving the interior)
		- exitpointLoc 	- x, y, z location for leaving the interior (this is also the place the player ends up being after entering the interior)
		- robpointLoc	- x, y, z location for the actual robbery checkpoint
		- storeStatus 	- leave it at 1, server will modify this on the fly.
		- lowestCash 	- certain interiors will give more than others, this is how you define the lowest amount that store will ever produce from a robbery.
		- highestCash 	- same as above, just this is the highest amount.
		- virtualWorld	- this tells the server which world to throw you in, this is so you only get player markers of people who are in the same store as you.
		- interiorWorld	- this tells the server which interior to put you in.
		- storeName		- this defines the name of the store for the text labels, and robbery reports "Jake has robbed Cluckin' Bell" etc.
		- lastRobbed	- this tells the server when the store was last robbed.
		- storePrice	- store price
		- storeOwner	- (-1 for manual load / 0 for "BLCNR Server")
	*/

	{1, {-1474.8071, 1488.8768, 8.2501}, {-794.9675, 490.1811, 1376.1953}, {-788.3607, 497.5167, 1371.7422}, 1, 4000, 8000, 3, 1, "Liberty city inside", 0, 10000000, -1, {-782.329528, 498.319580, 1371.749023, 2.251684}, 172},
	{2, {-1808.0221, 945.4167, 24.8906}, {372.3125, -132.8916, 1001.4922}, {376.9215, -115.4863, 1001.4922}, 1, 1000, 2000, 4, 5, "Well Stacked Pizza", 0, 2000000, -1, {374.696685, -117.276351, 1001.492187, 177.022628}, 155},
	{3, {-1809.8201, 902.8481, 24.8906}, {207.6829, -110.6515, 1005.1328}, {207.5093, -101.3514, 1005.2578}, 1, 1000, 2000, 5, 15, "Binco Clothing", 0, 2000000, -1, {208.833709, -98.698005, 1005.257812, 177.075088}, 211},
	{4, {-1912.1155, 828.2896, 35.2092}, {363.4346, -74.6586, 1001.5078}, {378.0959, -59.7760, 1001.5078}, 1, 1000, 2000, 6, 10, "Burger Shot", 0, 2000000, -1, {376.522827, -65.816207, 1001.507812, 180.815185}, 205},
	{5, {-2356.5769, 1008.0867, 50.8984}, {363.4346, -74.6586, 1001.5078}, {378.0959, -59.7760, 1001.5078}, 1, 1000, 2000, 7, 10, "Burger Shot", 0, 2000000, -1, {376.519958, -65.843879, 1001.507812, 179.558975}, 205},
	{6, {-2374.5620, 910.0986, 45.4453}, {207.6829, -110.6515, 1005.1328}, {207.5093, -101.3514, 1005.2578}, 1, 1000, 2000, 8, 15, "Binco Clothing", 0, 2000000, -1, {208.861343, -98.704345, 1005.257812, 180.398117}, 211},
	{7, {-2419.5413, 969.8095, 45.2969}, {-31.0479, -91.4085, 1003.5469}, {-27.9818, -89.7512, 1003.5469}, 1, 1000, 2000, 9, 18, "24/7", 0, 2000000, -1, {-26.949274, -91.619873, 1003.546875, 352.283081}, 169},
	{8, {-2242.4927, 128.6444, 35.3203}, {-2239.8569, 137.2601, 1035.4141}, {-2221.7893, 134.7148, 1035.6328}, 1, 1000, 2000, 10, 6, "Zero's RC Shop", 0, 2000000, -1, {-2238.027099, 128.567733, 1035.414062, 357.905670}, 289},
	{9, {-2269.7893, -155.9303, 35.3203}, {774.2042, -49.7428, 1000.5859}, {767.6898, -22.9267, 1000.5859}, 1, 1000, 2000, 11, 6, "San Fierro Gym", 0, 2000000, -1, {770.653015, -23.000875, 1000.585937, 89.111244}, 203},
	{10, {-2026.6393, -101.4065, 35.1641}, {-2026.8571, -104.0733, 1035.1719}, {-2031.8470, -117.4275, 1035.1719}, 1, 1000, 2000, 12, 3, "Driving School", 0, 2000000, -1, {-2034.843505, -116.826049, 1035.171875, 262.945922}, 147},
	{11, {-2571.1897, 246.5445, 10.3081}, {411.6910, -22.8669, 1001.8047}, {414.4622, -10.7796, 1001.8120}, 1, 1000, 2000, 13, 2, "Barber Shop", 0, 2000000, -1, {413.963409, -15.673501, 1001.804687, 94.832908}, 156},
	{12, {-2625.8931, 208.5265, 4.6150}, {315.7365, -143.0907, 999.6016}, {313.5016, -134.0640, 999.6016}, 1, 1000, 3000, 14, 7, "Ammunation", 0, 3500000, -1, {307.659606, -143.096420, 999.601562, 355.796386}, 179},
	{13, {-2767.4424, 788.8062, 52.7813}, {377.1708, -192.7061, 1000.6401}, {381.0800, -188.2198, 1000.6328}, 1, 1000, 2000, 15, 17, "Donut Shop", 0, 2000000, -1, {380.661956, -186.032775, 1000.632812, 89.597389}, 223},
 	{14, {-1694.4790, 950.8422, 24.8906}, {226.9353, -8.2048, 1002.2109}, {204.5254, -8.3194, 1001.2109}, 1, 1000, 2000, 16, 5, "Victim Clothing Store", 0, 2000000, -1, {206.485931, -8.191709, 1005.210937, 270.467468}, 211},
	{15, {-1816.5928, 617.7781, 35.1719}, {365.0151, -11.0958, 1001.8516}, {369.7530, -7.6813, 1001.8589}, 1, 1000, 2000, 17, 9, "Cluckin' Bell", 0, 2000000, -1, {368.122558, -4.490753, 1001.851562, 177.928573}, 167},
	{16, {-1883.0643, 865.8884, 35.1719}, {161.4177, -96.4533, 1001.8047}, {161.5182, -78.5563, 1001.8047}, 1, 1000, 2000, 19, 18, "Zip Clothing Store", 0, 2000000, -1, {159.706726, -81.185356, 1001.811950, 180.781600}, 211},
	{17, {-1721.7911, 1359.6581, 7.1853}, {372.3125, -132.8916, 1001.4922}, {376.9215, -115.4863, 1001.4922}, 1, 1000, 2000, 5, 5, "Well Stacked Pizza", 0, 2000000, -1, {374.695159, -117.254089, 1001.492187, 179.428009}, 155},
	{18, {-2672.3210, 258.8806, 4.6328}, {365.0151, -11.0958, 1001.8516}, {369.7530, -7.6813, 1001.8589}, 1, 1000, 2000, 20, 9, "Cluckin' Bell", 0, 2000000, -1, {370.863464, -4.491076, 1001.858886, 175.850357}, 167},
	{19, {-2491.6086, -38.9503, 25.7656}, {-204.3975, -8.6990, 1002.2734}, {-201.7257, -4.8095, 1002.2734}, 1, 1000, 2000, 21, 17, "Tattoo Parlour", 0, 2000000, -1, {-204.353164, -5.124205, 1002.273437, 227.064208}, 180},
	{20, {-2336.4358, -166.8006, 35.5547}, {363.4346, -74.6586, 1001.5078}, {378.0959, -59.7760, 1001.5078}, 1, 1000, 2000, 22, 10, "Burger Shot", 0, 2000000, -1, {376.494506, -65.835296, 1001.507812, 180.908065}, 205},
	{21, {-1617.2423, 1122.7692, 7.1875}, {-27.4370, -57.7182, 1003.5469}, {-23.2931, -55.1251, 1003.5469}, 1, 1000, 2000, 23, 6, "24/7", 0, 2000000, -1, {-23.670997, -57.340026, 1003.546875, 353.511505}, 188},
	{22, {-2128.6099, 707.1724, 69.5625}, {-100.4073, -24.4975, 1000.7188}, {-106.5551, -8.3633, 1000.7188}, 1, 1000, 3000, 24, 3, "Sex Shop", 0, 3000000, -1, {-104.749305, -8.913148, 1000.718750, 176.996566}, 246},
	{23, {-2442.6143, 754.8221, 35.1719}, {2840.7444, 2444.7473, 1786.4811}, {2829.8132, 2450.0747, 1786.4811}, 1, 1000, 2000, 27, 90, "Supa Save", 0, 2000000, -1, {2830.726074, 2455.974853, 1786.481079, 359.617950}, 141},
	{24, {-1605.6772, 711.3550, 13.8672}, {246.4087, 107.7346, 1003.2188}, {2829.8132, 2450.0747, 1786.4811}, 1, 1000, 2000, 25, 10, "SFPD", 0, 0, 0, {0.0, 0.974853, 0.481079, 0.617950}, 12},
	{25, {-2491.3083, -29.0240, 25.7656}, {203.8098, -49.9331, 1001.8047}, {203.8152, -39.8591, 1001.8047}, 1, 1000, 2000, 29, 1, "Suburban", 0, 2000000, -1, {203.220245, -41.668952, 1001.804687, 179.449630}, 211},
	{26, {-2242.6484, 674.1745, 49.4453}, {418.6246, -83.8433, 1001.8047}, {418.3450, -75.4491, 1001.8047}, 1, 1000, 2000, 30, 3, "Barber Shop", 0, 2000000, -1, {421.622009, -74.785354, 1001.804687, 137.658065}, 177},
	{27, {-2551.1594, 193.7173, 6.2271}, {493.4372, -24.1395, 1000.6797}, {474.8086, -13.9634, 1003.6953}, 1, 1000, 2000, 31, 17, "Gaydar Station", 0, 2000000, -1, {476.092620, -15.379406, 1003.695312, 261.423431}, 257},
	{28, {-1494.0299,920.0055,7.1875}, {2935.2236,-1803.4063,1191.0657}, {2942.4832,-1770.9304,1178.5847}, 1, 2000, 18000, 144, 0, "San Fierro Bank", 0, 0, 0, {2948.2803, -1801.8721, 1191.0657, 89.9012}, 150},
	{29, {-1675.8157, 431.9064, 7.1797}, {-31.0479, -91.4085, 1003.5469}, {-27.9818, -89.7512, 1003.5469}, 1, 1000, 2000, 33, 18, "Gas Station", 0, 2000000, -1, {-26.941997, -91.636978, 1003.546875, 357.998565}, 216},
	{30, {-2156.8938, 151.3933, 35.3203}, {-100.4073, -24.4975, 1000.7188}, {-106.5551, -8.3633, 1000.7188}, 1, 1000, 2000, 34, 3, "Sex Shop", 0, 2000000, -1, {-104.807029, -8.914463, 1000.718750, 179.619979}, 178},
	{31, {-2048.9309, 554.4623, 35.1719}, {206.9717, -139.9056, 1003.5078}, {207.1456, -130.0347, 1003.5078}, 1, 1000, 2000, 35, 3, "Pro Laps", 0, 2000000, -1, {207.773345, -127.796264, 1003.507812, 180.623397}, 211},
	{32, {-2177.4419, -42.2777, 35.3125}, {501.9236, -68.1505, 998.7578}, {496.3597, -75.2304, 998.7578}, 1, 1000, 6000, 36, 11, "10 Green Bottles", 0, 5000000, -1, {496.382354, -77.463447, 998.765075, 357.183166}, 100},
	{33, {-2624.1946, 1411.4656, 7.0938}, {-2636.7800, 1403.4661, 906.4609}, {-2666.4624, 1426.7899, 906.4609}, 1, 2000, 7000, 3, 3, "Pleasure Dome", 0, 10000000, -1, {-2656.170166, 1413.959106, 906.273437, 1.049970}, 85},
	{34, {-1758.0052, 1083.5776, 45.4453}, {363.4346, -74.6586, 1001.5078}, {378.0959, -59.7760, 1001.5078}, 1, 1000, 3000, 23, 10, "Burger Shot", 0, 2000000, -1, {376.546112, -65.846466, 1001.507812, 175.564590}, 205},
	{35, {-1731.3148, 1084.0166, 45.4453}, {161.4177, -96.4533, 1001.8047}, {161.5182, -78.5563, 1001.8047}, 1, 1000, 3000, 18, 18, "Zip Clothing Store", 0, 2000000, -1, {162.780761, -81.187232, 1001.804687, 178.068008}, 211},
	{36, {-1667.1660, 1202.7645, 7.2500}, {-644.3752, 1595.6836, 1027.5159}, {-651.5170, 1598.4626, 1027.5159}, 1, 1000, 7000, 18, 18, "Otto's Autos", 0, 10000000, -1, {-651.081542, 1595.195190, 1028.285888, 269.724853}, 141},
	{37, {-1670.6616, 903.5870, 24.8906}, {-100.4073, -24.4975, 1000.7188}, {-106.5551, -8.3633, 1000.7188}, 1, 1000, 4000, 36, 3, "Underground Sex Shop", 0, 5000000, -1, {-104.765281, -8.906594, 1000.718750, 178.150604}, 246},
	{38, {-1728.6647, 667.7780, 25.0605}, {372.3125, -132.8916, 1001.4922}, {376.9215, -115.4863, 1001.4922}, 1, 1000, 2000, 19, 5, "Well Stacked Pizza", 0, 2000000, -1, {376.650207, -117.265365, 1001.492187, 178.661758}, 155},
	{39, {-1728.6912, 685.9053, 25.0627}, {203.8098, -49.9331, 1001.8047}, {203.8152, -39.8591, 1001.8047}, 1, 1000, 2000, 30, 1, "Suburban", 0, 2000000, -1, {204.947982, -41.325241, 1001.804687, 268.181304}, 211},
	{40, {-1910.3787, 883.5793, 35.1719}, {285.541687, -41.057380, 1001.515625}, {297.028228, -40.614536, 1001.515625}, 1, 2000, 5000, 112, 1, "Ammunation", 0, 5000000, -1, {295.161499, -40.215602, 1001.515625, 357.909210}, 179},
    {41, {-2129.2578,643.7931,52.3672}, {6.2483,-30.8078,1003.5494}, {-10.2011,-3.9657,1003.5494}, 1, 2000, 5000, 12, 10, "24/7", 0, 5000000, -1, {451.374633, -82.223197, 999.554687, 172.244384}, 226},
    {42, {-1987.9539,203.9813,27.6799}, {459.4670, -88.3607, 999.5547}, {449.1274, -80.8677, 999.5547}, 1, 2000, 7000, 13, 4, "New Store!", 0, 5000000, -1, { 451.396240, -82.224082, 999.554687, 175.564941}, 226},
    {43, {}, {}, {-1493.0911, 931.1298, 7.1875}, 1, 500, 2500, 0, 0, "Robbery", 0, 0, -1, {}, 226}
},
It is Giving Errors On Line!
Invalid Expression assumed zero:-
Код:
    {43, {}, {}, {-1493.0911, 931.1298, 7.1875}, 1, 500, 2500, 0, 0, "Robbery", 0, 0, -1, {}, 226}
And
invalid function or deceleration
Код:
},
There is a comma becoz there is also half part of script below and it compiles after removing shop 43 and changing max to 42,
I want to add robbery checkpoint on atm! so i didnt added enter or exit checkpoints and left them empty!
Reply
#2

Show us Checkpoint.inc code
Reply
#3

try

#define MAX_ROB_CHECKPOINT (44)

and also check defines.inc
Reply
#4

Код:
public placeAllCheckpoints()
{
	new i = 0, fmt[256], owner[30], query[256];
	while(i < MAX_ROB_CHECKPOINT)
	{
		checkpointIndex[i][0] = CreateDynamicCP(checkpointData[i][enterpointLoc][0], checkpointData[i][enterpointLoc][1], checkpointData[i][enterpointLoc][2], 1.5, -1, -1, -1, 100.0);
		checkpointIndex[i][1] = CreateDynamicCP(checkpointData[i][exitpointLoc][0], checkpointData[i][exitpointLoc][1], checkpointData[i][exitpointLoc][2], 1.5, checkpointData[i][virtualWorld], checkpointData[i][interiorWorld], -1, 100.0);
		checkpointIndex[i][2] = CreateDynamicCP(checkpointData[i][robpointLoc][0], checkpointData[i][robpointLoc][1], checkpointData[i][robpointLoc][2], 1.5, checkpointData[i][virtualWorld], checkpointData[i][interiorWorld], -1, 100.0);
		checkpointLabel[i][0][0] = Create3DTextLabel("[ENTER]", COLOR_YELLOW, checkpointData[i][enterpointLoc][0], checkpointData[i][enterpointLoc][1], checkpointData[i][enterpointLoc][2] + 0.2, 25.0, 0, 1);
		checkpointData[i][storeMoney] = 0;
		if(checkpointData[i][storeOwner] == -1)
		{
			format(fmt, 256, "storeowner/%d.owner", i);
			if(fexist(fmt))
			{
				new File:file = fopen(fmt);
				fread(file, owner, 30);
				fclose(file);
				format(query, 256, "SELECT playerName from playerdata WHERE playerID = %d", strval(owner));
				mysql_query(query, -1, -1, connection);
				mysql_store_result();
				if(mysql_num_rows() == 0)
				{
					fremove(fmt);
					format(fmt, 256, "%s\nUnowned\nPrice: $%s", checkpointData[i][storeName], FormatNumber(checkpointData[i][storePrice]));
				}
				else
				{
					checkpointData[i][storeOwner] = strval(owner);
					format(fmt, 256, "storeowner/%d.money", i);
					if(!fexist(fmt))
					{
						file = fopen(fmt, io_write);
						fwrite(file, "0");
						fclose(file);
					}
					file = fopen(fmt);
					fread(file, owner, 30);
					fclose(file);
					checkpointData[i][storeMoney] = strval(owner);
					mysql_fetch_field("playerName", owner);
					format(fmt, 256, "%s\nOwner: %s", checkpointData[i][storeName], owner);
				}
				mysql_free_result();
			}
			else
				format(fmt, 256, "%s\nUnowned\nPrice: $%s", checkpointData[i][storeName], FormatNumber(checkpointData[i][storePrice]));
		}
		else
			format(fmt, 256, "%s", checkpointData[i][storeName]);
		checkpointLabel[i][0][1] = Create3DTextLabel(fmt, COLOR_WHITE, checkpointData[i][enterpointLoc][0], checkpointData[i][enterpointLoc][1], checkpointData[i][enterpointLoc][2] + 0.05, 25.0, 0, 1);
		checkpointLabel[i][1][0] = Create3DTextLabel("[ROBBERY]", COLOR_YELLOW, checkpointData[i][robpointLoc][0], checkpointData[i][robpointLoc][1], checkpointData[i][robpointLoc][2] + 0.2, 7.5, checkpointData[i][virtualWorld], 1);
		checkpointData[i][storeActor] = CreateActor(checkpointData[i][storeActorSkin], checkpointData[i][storeActorPos][0], checkpointData[i][storeActorPos][1], checkpointData[i][storeActorPos][2], checkpointData[i][storeActorPos][3]);
		SetActorVirtualWorld(checkpointData[i][storeActor], checkpointData[i][virtualWorld]);
		checkpointLabel[i][1][1] = Create3DTextLabel(checkpointData[i][storeName], COLOR_WHITE, checkpointData[i][robpointLoc][0], checkpointData[i][robpointLoc][1], checkpointData[i][robpointLoc][2] + 0.05, 7.5, checkpointData[i][virtualWorld], 1);
		checkpointLabel[i][2][0] = Create3DTextLabel("[EXIT]", COLOR_YELLOW, checkpointData[i][exitpointLoc][0], checkpointData[i][exitpointLoc][1], checkpointData[i][exitpointLoc][2] + 0.2, 7.5, checkpointData[i][virtualWorld], 1);
		checkpointLabel[i][2][1] = Create3DTextLabel(checkpointData[i][storeName], COLOR_WHITE, checkpointData[i][exitpointLoc][0], checkpointData[i][exitpointLoc][1], checkpointData[i][exitpointLoc][2] + 0.05, 7.5, checkpointData[i][virtualWorld], 1);

		i++;
	}
THis Is Checkpoints.inc for RobberyCheckpoints!
Reply
#5

{43, {}, {},

It cannot by empty array.
Reply
#6

Already FixeD!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)