error 018 and error 010
#1

pawn Код:
C:\Users\User\Desktop\[IT]SFCNR\gamemodes\IT.pwn(502) : error 018: initialization data exceeds declared size
C:\Users\User\Desktop\[IT]SFCNR\gamemodes\IT.pwn(504) : error 010: invalid function or declaration
C:\Users\User\Desktop\[IT]SFCNR\gamemodes\IT.pwn(552) : error 018: initialization data exceeds declared size
C:\Users\User\Desktop\[IT]SFCNR\gamemodes\IT.pwn(554) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
new Float:checkCoords[MAX_POINTS][4] = {
{-1623.6704,710.2758,-1595.5138,726.3750}, //SFPDEnt
{233.7716,107.9433,259.8581,122.0880}, //SFPDExit
{-1628.7830,672.2675,-1586.4739,691.8566}, //DropOff
{-1527.6946,868.8881,-1492.1344,955.5516}, //BankEnt
{2304.6948,-17.3057,2312.3196,-13.2586}, //BankExit
{2311.6550,-13.6536,2316.6047,-0.1508}, //BankMain
{-1245.9392,708.7461,-1219.4531,764.7156}, //CIAEnt
{272.2762,169.4900,301.7643,184.6361}, //CIAExit
{228.7007,140.0458,248.7588,153.6630}, //CIAExit2
{280.3638,178.2592,301.9283,192.3590}, //CIASat
{-1781.6199,949.1130,-1727.1202,964.0967}, //FBIEnt
{242.7642,62.7023,255.3901,72.0994}, //FBIExit
{-2486.7969,720.7235,-2399.2456,757.8288}, //SupaSaveEnt
{4.5919,-30.8944,9.4711,-24.1830}, //SupaSaveExit
{-8.3713,-31.1897,3.9439,-23.9503}, //SupaSaveMain
{-2130.8936,898.9030,-2085.2764,913.5282}, //DrugHouseCaltonHeights
{-2800.3831,-17.7937,-2757.5454,36.4089}, //DrugHouseOceanFlats
{-2614.3384,794.2173,-2548.7556,819.7993}, //DrugHouseParadiso
{-2466.9871,1251.7363,-2433.7473,1309.5492}, //DrugHouseJuniperHollow
{-1593.1047,100.3332,-1527.3502,148.0326}, //ShipYard
{-1677.6678,1202.5203,-1621.3718,1237.6665}, //OttoCP
{-1925.1906,276.9108,-1910.2406,309.3634}, //BombShop
{-1332.1198,764.7802,-1284.4316,799.4351}, //CIASatBlow
{-1548.1466,765.9007,-1483.7194,801.4399}, //CIABridge
{362.3203,-76.7831,382.6036,-64.5106}, //BurgerShotMain
{363.8834,-11.4192,380.8347,-6.0182}, //CluckenBellMain
{284.2406,-40.9833,299.4141,-30.4050}, //Ammunation
{478.1811,-24.5361,501.1296,-2.1605}, //GayDarMain
{-2240.0078,128.3076,-2223.8943,137.1232}, //ZeroMain
{487.6969,-76.0396,511.9043,-71.8035}, //MistysMain
{754.0794,-50.2732,777.8512,-16.4785}, //GYM
{-2035.6058,-119.3974,-2021.7870,-108.7207}, //School
{-1971.3776,253.6257,-1950.4263,308.1653}, //WangCars
{-1978.7638,116.7885,-1956.5165,155.2209}, //Train
{416.8030,-84.2422,422.2446,-74.0695}, //Barbers
{-2766.5471,360.1405,-2744.8018,392.1549}, //CityHall
{-2670.9158,614.7380,-2637.2957,640.1582}, //Hospital
{-2678.9795,1396.2579,-2634.2734,1426.7246}, //Jizzys
{367.0538,-133.4065,380.3084,-118.8081}, //PizzaMain
{145.4055,-96.1957,177.4023,-70.9268}, //ZipMain
{199.8335,-13.0003,227.0720,-3.5268}, //VictimMain
{200.5280,-111.0826,217.7478,-96.9589}, //BincoMain
{377.7993,170.0076,389.6078,177.6493}, //CityHallExit
{354.1745,158.6413,390.2875,188.8046}, //CityHallMain
{-1564.0575,1128.0381,7.1875,265.1870}, //GayEnt
{394.0296,-31.4441,1001.8028,269.9235}, //GayExit
{387.6704,-29.8198,1001.8028,357.0310} //GayMain
};

new Float:checkpoints[MAX_POINTS][4] = {
{-1605.5288,712.4097,13.8714,3.0}, //SFPDEnt
{246.4093,109.0884,1003.2188,3.0}, //SFPDExit
{-1606.3319,673.9650,-5.2422,3.0}, //DropOff
{-1493.4175,920.0615,7.1875,3.0}, //BankEnt
{2305.5889,-16.2092,26.7496,3.0}, //BankExit
{2315.8198,-7.2530,26.7422,3.0}, //BankMain
{-1222.6882,738.9059,6.6299,3.0}, //CIAEnt
{288.6720,170.1256,1007.1794,3.0}, //CIAExit
{238.6524,140.8584,1003.0234,3.0}, //CIAExit2
{297.5231,183.4510,1007.1719,3.0}, //CIASat
{-1754.1787,962.3545,24.8828,3.0}, //FBIEnt
{246.7218,63.4211,1003.6406,3.0}, //FBIExit
{-2442.7930,754.4579,35.1719,3.0}, //SupaSaveEnt
{6.2157,-30.8714,1003.5494,3.0}, //SupaSaveExit
{1.6692,-28.4267,1003.5494,3.0}, //SupaSaveMain
{-2099.6882,899.1699,76.7109,3.0}, //DrugHouseCaltonHeights
{-2779.9194,0.3026,10.0625,3.0}, //DrugHouseOceanFlats
{-2576.4824,818.9226,49.9844,3.0}, //DrugHouseParadiso
{-2433.7866,1281.6011,23.7422,3.0}, //DrugHouseJuniperHollow
{-1547.4066,123.6555,3.5547,5.0}, //ShipYard
{-1657.7573,1210.2754,7.2500,3.0}, //OttoCP
{-1923.3926,303.6380,41.0469,3.0}, //BombShop
{-1308.1965,796.5082,6.6299,3.0}, //CIASatBlow
{-1496.3555,796.4011,7.1875,3.0}, //CIABridge
{373.0567,-65.5078,1001.5078,3.0}, //BurgerShotMain
{370.7744,-6.5378,1001.8589,3.0}, //CluckinBellMain
{294.0775,-40.7211,1001.5156,3.0}, //Ammunation
{499.5635,-18.8676,1000.6719,3.0}, //GayDarMain
{-2235.2788,130.4634,1035.4141,3.0}, //ZeroMain
{495.6589,-75.4557,998.7578,3.0}, //MistysMain
{754.6652,-41.0422,1000.5859,3.0}, //GYM
{-2032.9712,-117.4418,1035.1719,3.0}, //School
{-1951.9911,300.2070,35.4688,3.0}, //WangCars
{-1972.4688,117.8655,27.6940,3.0}, //Train
{421.5031,-76.8336,1001.8047,3.0}, //Barbers
{-2765.7402,375.5952,6.3347,3.0}, //CityHall
{-2658.3201,639.5060,14.4531,3.0}, //Hospital
{-2656.2332,1416.1669,906.2734,3.0}, //Jizzys
{376.7648,-119.4542,1001.4995,3.0}, //PizzaMain
{162.8374,-83.6908,1001.8047,3.0}, //ZipMain
{205.6493,-10.6077,1001.2109,3.0}, //VictimMain
{206.2597,-100.7781,1005.2578,3.0}, //BincoMain
{389.2351,173.7753,1008.3828,3.0}, //CityHallExit
{362.0905,173.7759,1008.3828,3.0}, //CityHallMain
{-1564.0575,1128.0381,7.1875,3.0}, //GayEnt
{394.0296,-31.4441,1001.8028,3.0}, //GayExit
{387.6704,-29.8198,1001.8028,3.0} //GayMain
};

new checkpointType[MAX_POINTS] = {
CP_SFPDEnt,
CP_SFPDExit,
CP_DropOff,
CP_BankEnt,
CP_BankExit,
CP_BankMain,
CP_CIAEnt,
CP_CIAExit,
CP_CIAExit2,
CP_CIASat,
CP_FBIEnt,
CP_FBIExit,
CP_SupaSaveEnt,
CP_SupaSaveExit,
CP_SupaSaveMain,
CP_DrugHouseCaltonHeights,
CP_DrugHouseOceanFlats,
CP_DrugHouseParadiso,
CP_DrugHouseJuniperHollow,
CP_ShipYard,
CP_OttoCP,
CP_BombShop,
CP_CIASatBlow,
CP_CIABridge,
CP_BurgerShotMain,
CP_CluckinBellMain,
CP_Ammunation,
CP_GayDarMain,
CP_ZeroMain,
CP_MistysMain,
CP_GYM,
CP_School,
CP_WangCars,
CP_Train,
CP_Barbers,
CP_CityHallEnt,
CP_Hospital,
CP_Jizzys,
CP_PizzaMain,
CP_ZipMain,
CP_CityHallExit,
CP_CityHallMain,
CP_GayEnt,
CP_GayExit,
CP_GayMain
};
Error lines:
pawn Код:
from new Float:checkCoords[MAX_POINTS][4] = {
{394.0296,-31.4441,1001.8028,269.9235}, //GayExit ==502

}; //==504
pawn Код:
from new Float:checkpoints[MAX_POINTS][4] = {
{394.0296,-31.4441,1001.8028,3.0}, //GayExit =552

}; //==554
Reply
#2

Hey dont use like this [MAX_POINT][4]

use only [][]

the system it self defines
Reply
#3

pawn Код:
from new Float:checkpoints[][] = { // the [][] must be empty.. coz the system it self defines :D
{394.0296,-31.4441,1001.8028,3.0}, //GayExit =552

}; //==554
sorry for Double post forgot to edit :P
Reply
#4

try this stef
pawn Код:
new Float:checkCoords[][] = {
{-1623.6704,710.2758,-1595.5138,726.3750}, //SFPDEnt
{233.7716,107.9433,259.8581,122.0880}, //SFPDExit
{-1628.7830,672.2675,-1586.4739,691.8566}, //DropOff
{-1527.6946,868.8881,-1492.1344,955.5516}, //BankEnt
{2304.6948,-17.3057,2312.3196,-13.2586}, //BankExit
{2311.6550,-13.6536,2316.6047,-0.1508}, //BankMain
{-1245.9392,708.7461,-1219.4531,764.7156}, //CIAEnt
{272.2762,169.4900,301.7643,184.6361}, //CIAExit
{228.7007,140.0458,248.7588,153.6630}, //CIAExit2
{280.3638,178.2592,301.9283,192.3590}, //CIASat
{-1781.6199,949.1130,-1727.1202,964.0967}, //FBIEnt
{242.7642,62.7023,255.3901,72.0994}, //FBIExit
{-2486.7969,720.7235,-2399.2456,757.8288}, //SupaSaveEnt
{4.5919,-30.8944,9.4711,-24.1830}, //SupaSaveExit
{-8.3713,-31.1897,3.9439,-23.9503}, //SupaSaveMain
{-2130.8936,898.9030,-2085.2764,913.5282}, //DrugHouseCaltonHeights
{-2800.3831,-17.7937,-2757.5454,36.4089}, //DrugHouseOceanFlats
{-2614.3384,794.2173,-2548.7556,819.7993}, //DrugHouseParadiso
{-2466.9871,1251.7363,-2433.7473,1309.5492}, //DrugHouseJuniperHollow
{-1593.1047,100.3332,-1527.3502,148.0326}, //ShipYard
{-1677.6678,1202.5203,-1621.3718,1237.6665}, //OttoCP
{-1925.1906,276.9108,-1910.2406,309.3634}, //BombShop
{-1332.1198,764.7802,-1284.4316,799.4351}, //CIASatBlow
{-1548.1466,765.9007,-1483.7194,801.4399}, //CIABridge
{362.3203,-76.7831,382.6036,-64.5106}, //BurgerShotMain
{363.8834,-11.4192,380.8347,-6.0182}, //CluckenBellMain
{284.2406,-40.9833,299.4141,-30.4050}, //Ammunation
{478.1811,-24.5361,501.1296,-2.1605}, //GayDarMain
{-2240.0078,128.3076,-2223.8943,137.1232}, //ZeroMain
{487.6969,-76.0396,511.9043,-71.8035}, //MistysMain
{754.0794,-50.2732,777.8512,-16.4785}, //GYM
{-2035.6058,-119.3974,-2021.7870,-108.7207}, //School
{-1971.3776,253.6257,-1950.4263,308.1653}, //WangCars
{-1978.7638,116.7885,-1956.5165,155.2209}, //Train
{416.8030,-84.2422,422.2446,-74.0695}, //Barbers
{-2766.5471,360.1405,-2744.8018,392.1549}, //CityHall
{-2670.9158,614.7380,-2637.2957,640.1582}, //Hospital
{-2678.9795,1396.2579,-2634.2734,1426.7246}, //Jizzys
{367.0538,-133.4065,380.3084,-118.8081}, //PizzaMain
{145.4055,-96.1957,177.4023,-70.9268}, //ZipMain
{199.8335,-13.0003,227.0720,-3.5268}, //VictimMain
{200.5280,-111.0826,217.7478,-96.9589}, //BincoMain
{-1564.0575,1128.0381,7.1875,265.1870}, //GayEnt
{394.0296,-31.4441,1001.8028,269.9235}, //GayExit
{387.6704,-29.8198,1001.8028,357.0310}, //GayMain
{377.7993,170.0076,389.6078,177.6493}, //CityHallExit
{354.1745,158.6413,390.2875,188.8046} //CityHallMain
};

new Float:checkpoints[][] = {
{-1605.5288,712.4097,13.8714,3.0}, //SFPDEnt
{246.4093,109.0884,1003.2188,3.0}, //SFPDExit
{-1606.3319,673.9650,-5.2422,3.0}, //DropOff
{-1493.4175,920.0615,7.1875,3.0}, //BankEnt
{2305.5889,-16.2092,26.7496,3.0}, //BankExit
{2315.8198,-7.2530,26.7422,3.0}, //BankMain
{-1222.6882,738.9059,6.6299,3.0}, //CIAEnt
{288.6720,170.1256,1007.1794,3.0}, //CIAExit
{238.6524,140.8584,1003.0234,3.0}, //CIAExit2
{297.5231,183.4510,1007.1719,3.0}, //CIASat
{-1754.1787,962.3545,24.8828,3.0}, //FBIEnt
{246.7218,63.4211,1003.6406,3.0}, //FBIExit
{-2442.7930,754.4579,35.1719,3.0}, //SupaSaveEnt
{6.2157,-30.8714,1003.5494,3.0}, //SupaSaveExit
{1.6692,-28.4267,1003.5494,3.0}, //SupaSaveMain
{-2099.6882,899.1699,76.7109,3.0}, //DrugHouseCaltonHeights
{-2779.9194,0.3026,10.0625,3.0}, //DrugHouseOceanFlats
{-2576.4824,818.9226,49.9844,3.0}, //DrugHouseParadiso
{-2433.7866,1281.6011,23.7422,3.0}, //DrugHouseJuniperHollow
{-1547.4066,123.6555,3.5547,5.0}, //ShipYard
{-1657.7573,1210.2754,7.2500,3.0}, //OttoCP
{-1923.3926,303.6380,41.0469,3.0}, //BombShop
{-1308.1965,796.5082,6.6299,3.0}, //CIASatBlow
{-1496.3555,796.4011,7.1875,3.0}, //CIABridge
{373.0567,-65.5078,1001.5078,3.0}, //BurgerShotMain
{370.7744,-6.5378,1001.8589,3.0}, //CluckinBellMain
{294.0775,-40.7211,1001.5156,3.0}, //Ammunation
{499.5635,-18.8676,1000.6719,3.0}, //GayDarMain
{-2235.2788,130.4634,1035.4141,3.0}, //ZeroMain
{495.6589,-75.4557,998.7578,3.0}, //MistysMain
{754.6652,-41.0422,1000.5859,3.0}, //GYM
{-2032.9712,-117.4418,1035.1719,3.0}, //School
{-1951.9911,300.2070,35.4688,3.0}, //WangCars
{-1972.4688,117.8655,27.6940,3.0}, //Train
{421.5031,-76.8336,1001.8047,3.0}, //Barbers
{-2765.7402,375.5952,6.3347,3.0}, //CityHall
{-2658.3201,639.5060,14.4531,3.0}, //Hospital
{-2656.2332,1416.1669,906.2734,3.0}, //Jizzys
{376.7648,-119.4542,1001.4995,3.0}, //PizzaMain
{162.8374,-83.6908,1001.8047,3.0}, //ZipMain
{205.6493,-10.6077,1001.2109,3.0}, //VictimMain
{206.2597,-100.7781,1005.2578,3.0}, //BincoMain
{-1564.0575,1128.0381,7.1875,3.0}, //GayEnt
{394.0296,-31.4441,1001.8028,3.0}, //GayExit
{387.6704,-29.8198,1001.8028,3.0}, //GayMain
{389.2351,173.7753,1008.3828,3.0}, //CityHallExit
{362.0905,173.7759,1008.3828,3.0} //CityHallMain
};

new checkpointType[][] = {
CP_SFPDEnt,
CP_SFPDExit,
CP_DropOff,
CP_BankEnt,
CP_BankExit,
CP_BankMain,
CP_CIAEnt,
CP_CIAExit,
CP_CIAExit2,
CP_CIASat,
CP_FBIEnt,
CP_FBIExit,
CP_SupaSaveEnt,
CP_SupaSaveExit,
CP_SupaSaveMain,
CP_DrugHouseCaltonHeights,
CP_DrugHouseOceanFlats,
CP_DrugHouseParadiso,
CP_DrugHouseJuniperHollow,
CP_ShipYard,
CP_OttoCP,
CP_BombShop,
CP_CIASatBlow,
CP_CIABridge,
CP_BurgerShotMain,
CP_CluckinBellMain,
CP_Ammunation,
CP_GayDarMain,
CP_ZeroMain,
CP_MistysMain,
CP_GYM,
CP_School,
CP_WangCars,
CP_Train,
CP_Barbers,
CP_CityHallEnt,
CP_Hospital,
CP_Jizzys,
CP_PizzaMain,
CP_ZipMain,
CP_GayEnt,
CP_GayExit,
CP_GayMain,
CP_CityHallExit,
CP_CityHallMain
};
Reply
#5

Quote:
Originally Posted by dr.lozer
Посмотреть сообщение
pawn Код:
from new Float:checkpoints[][] = { // the [][] must be empty.. coz the system it self defines :D
{394.0296,-31.4441,1001.8028,3.0}, //GayExit =552

}; //==554
sorry for Double post forgot to edit :P
How does it find the MAX_POINTS then?
Reply
#6

Dude the system it self make!!!! a define!! just use like @pds2012's post
Reply
#7

Try this

count all checkpoints and according to that put
Max_points (number of cps)

if i helped ou then +1 rep
Reply
#8

Quote:
Originally Posted by Stefand
Посмотреть сообщение
How does it find the MAX_POINTS then?
You added a new checkpoint, so the old value from your MAX_POINTS wont match

Just let the preprocessor handle the job with "[][]" and than you just can do
pawn Код:
new const checkpointType[] = {
    CP_GayExit
};

#define MAX_POINTS (sizeof checkpointType)

stock const Float: checkCoords[MAX_POINTS][] = {
    {394.0296, -31.4441, 1001.8028, 269.9235}
};

stock const Float: checkpoints[MAX_POINTS][] = {
    {394.0296,-31.4441,1001.8028,3.0}
};
Also use const for constant data

My only question is whats the meaning of the checkpointType array and where do you define "CP_GayExit"
Reply
#9

Its for this:

pawn Код:
if(getCheckpointType(playerid) != CP_DropOff)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You must be in the Checkpoint at the SFPD garage to drop off suspects.");
        return 1;
    }
etc just to define which CP or something, not sure its a downloaded GM but we edited it big time, this is the first time we try to make extra robbing positions
Reply
#10

Quote:
Originally Posted by Stefand
Посмотреть сообщение
Its for this:

pawn Код:
if(getCheckpointType(playerid) != CP_DropOff)
    {
        SendClientMessage(playerid,COLOR_ERROR,"You must be in the Checkpoint at the SFPD garage to drop off suspects.");
        return 1;
    }
etc just to define which CP or something, not sure its a downloaded GM but we edited it big time, this is the first time we try to make extra robbing positions
Ah okay, most of the downloaded GM's aren't made very user friendly
It just seems for me that the array checkpointType is totally useless
But if it works than it should be fine, its not your fault that the GM creater had no clue

That the new one doesnt work is that fault of MAX_POINTS, just change your code in that format
Just move checkpointType and than define MAX_POINTS as the size of this array (see my last post)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)