errors bij compilen
#1

hey ik ben bezig met het ls cops and robbers systeem
ik krijg 2 errors:
Code:
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(332) : error 052: multi-dimensional arrays must be fully initialized
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(369) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
hier gaat het om:
Code:
new playerCheckpoint[MAX_PLAYERS];
new Float:checkpoints[MAX_POINTS][4] = {
{-28.100069,-89.627357,1003.5469,3.0}, //69 Cent STore
{246.375991,109.245994,1003.218750, 3.0}, //SFPD Exit
{1484.7555,-1771.3855,18.7958, 3.0}, //CP_PrisonEnter
{1510.011352, -1060.139526, 25.062500, 3.0}, //CP bank Enter
{2304.7012,-16.0591,26.7422, 3.0}, //CP BankExit
{2311.645019, -4.784075, 26.742187, 3.0}, // Inside Bank
{2174.755615, -2249.109130, 13.303812, 3.0}, //Explosives
{977.451416, -769.852722, 112.202629, 3.0}, // Admin House Enter
{2317.830322, -1026.757690, 1050.217773, 3.0}, //Admin House Exit
{1940.014160, -2116.011474, 13.695312, 3.0}, //Sex Shop Enter
{-100.511611, -23.429288, 1000.718750, 3.0}, // Sex Shop Exit
{-105.566085, -10.617439, 1000.718750, 3.0}, // Sex Shop Counter
{1928.582031, -1776.320434, 13.546875, 3.0}, // Gas Station Enter
{-10.311285, -178.242904, 1003.546875, 3.0}, // Gas station checkpoint
{-26.028060, -187.120574, 1003.546875, 3.0}, // Store one exit
{476.096069, -15.185485, 1003.695312, 3.0}, // dance Rob
{293.810852, -34.787994, 1001.515625, 3.0}, // Ammunation (Center LS) Robbery Spot
{377.797363, -67.435653, 1001.507812, 3.0}, // Burger Shot Robbery Spot
{1176.014282, -1323.302246, 14.000391, 3.0}, // Hospital
{-201.742660, -23.566627, 1002.273437, 3.0}, // Tatoo Shop
{1214.997924, -13.298475, 1000.921875, 3.0}, // Pig Pen Robbery Spot
{2034.464721, -1406.565551, 17.205287, 3.0}, // hospital
{1440.501220, -2287.199462, 13.546875, 3.0},// Airpot blow cp
{363.255249, -2009.069458, 7.835937, 3.0}, // park cp for blow
{-31.306764, -28.996454, 1003.557250, 3.0}, // Gas Station Rob
{1401.436889, -767.322265, 95.011589, 3.0}, // Vinewood sign blow cp
{1526.515136, -1071.242065, 25.062500, 3.0}, // Blow bank CP
{2147.707763, -1367.095458, 25.641782, 3.0}, // Drug house cp
{203.934204, -40.282241, 1001.804687, 3.0}, // SubUrban robbery checkpoint
{207.757797, -98.696815, 1005.257812, 3.0}, // Binco rob
{376.704528, -118.806343, 1001.499511, 3.0}, // Pizza place robbery
{1642.319335, -2237.777832, 13.498379, 3.0}, // Airport
{-1422.704101, -286.657531, 14.148437, 3.0}, // SF Airport cp
{1674.765625, 1447.695068, 10.789379, 3.0} // LV Airport
};

new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //69 Cent Store
{242.375991, 103.245994, 250.375991, 113.245994},//SFPD Exit
{1480.7555,-1777.3855 , 1485.7555, -1766.3855}, //CP_PrisonEnter
{1506.011352, -1064.139526, 1514.011352, -1056.139526}, // bank
{2300.7012, -24.0591, 2308.7012, -12.0591}, //CP BANK EXIT
{2307.645019, -8.784074, 2315.645019, -0.784075}, // Inside Bank
{2170.755615, -2253.109130, 2178.755615, -2245.109130}, //Explosives
{973.451416, -773.852722, 981.451416, -765.852722}, // Admin House
{2313.830322, -1030.757690, 2321.830322, -1022.757690}, //Admin House Exit
{1926.014160, -2126.011474, 1950.014160, -2106.011474}, //Sex Shop enter
{-114.511611, -33.429290, -90.511611, -13.429288}, // Sex Shop Exit
{-119.566085, -20.617439, -95.566085, -0.617439}, // Sex Shop Counter
{1914.582031, -1786.320434, 1938.582031, -1766.320434}, // Gas Station Enter
{-24.311285, -188.242904, -0.311285, -168.242904}, // Gas station checkpoint
{-40.028060, -197.120574, -16.028060, -177.120574}, // Store one exit
{462.096069, -25.185485, 486.096069, -5.185485}, // dance Rob
{279.810852, -44.787994, 303.810852, -24.787994}, // Ammunation (Center LS) Robbery Spot
{363.797363, -77.435653, 387.797363, -57.435653}, // Burger Shot Robbery Spot
{1166.014282, -1333.302246, 1186.014282, -1313.302246}, // Hospital
{-211.742660, -33.566627, -191.742660, -13.566627}, // Tatoo Shop
{1204.997924, -23.298475, 1224.997924, -3.298475}, // Pig Pen Robbery Spot
{2024.464721, -1416.565551, 2044.464721, -1396.565551},// hospital
{1430.501220, -2297.199462, 1450.501220, -2277.199462}, // Airpot blow cp
{353.255249, -2019.069458, 373.255249, -1999.069458}, // park cp for blow
{-41.306762, -38.996452, -21.306764, -18.996454}, // Gas Station Rob
{1391.436889, -777.322265, 1411.436889, -757.322265}, // Vinewood sign blow cp
{1516.515136, -1081.242065, 1536.515136, -1061.242065}, // Blow bank CP
{2137.707763, -1377.095458, 2157.707763, -1357.095458}, // Drug house cp
{193.934204, -50.282241, 213.934204, -30.282241}, // SubUrban robbery checkpoint
{197.757797, -108.696815, 217.757797, -88.696815}, // Binco rob
{366.704528, -128.806335, 386.704528, -108.806343}, // Pizza place robbery
{1592.319335, -2287.777832, 1692.319335, -2187.777832}, // Airport
{-1472.704101, -336.657531, -1372.704101, -236.657531}, // SF Airport cp
{1624.765625, 1397.695068, 1724.765625, 1497.695068} // LV Airport
};
Reply
#2

MAX_POINTS is hoogstwaarschijnlijk groter dan dat de array is.
Reply
#3

Quote:
Originally Posted by mamorunl
View Post
MAX_POINTS is hoogstwaarschijnlijk groter dan dat de array is.
hoe los ik het op? ik ben een beginnende scripter.

dit was de originele code:
Code:
new playerCheckpoint[MAX_PLAYERS];
new Float:checkpoints[MAX_POINTS][4] = {
{-28.100069,-89.627357,1003.5469,3.0}, //69 Cent STore
{246.375991,109.245994,1003.218750, 3.0}, //SFPD Exit
{1484.7555,-1771.3855,18.7958, 3.0}, //CP_PrisonEnter
{1510.011352, -1060.139526, 25.062500, 3.0}, //CP bank Enter
{2304.7012,-16.0591,26.7422, 3.0}, //CP BankExit
{2311.645019, -4.784075, 26.742187, 3.0}, // Inside Bank
{2174.755615, -2249.109130, 13.303812, 3.0}, //Explosives
{977.451416, -769.852722, 112.202629, 3.0}, // Admin House Enter
{2317.830322, -1026.757690, 1050.217773, 3.0}, //Admin House Exit
{1940.014160, -2116.011474, 13.695312, 3.0}, //Sex Shop Enter
{-100.511611, -23.429288, 1000.718750, 3.0}, // Sex Shop Exit
{-105.566085, -10.617439, 1000.718750, 3.0}, // Sex Shop Counter
{1928.582031, -1776.320434, 13.546875, 3.0}, // Gas Station Enter
{-10.311285, -178.242904, 1003.546875, 3.0}, // Gas station checkpoint
{-26.028060, -187.120574, 1003.546875, 3.0}, // Store one exit
{476.096069, -15.185485, 1003.695312, 3.0}, // dance Rob
{293.810852, -34.787994, 1001.515625, 3.0}, // Ammunation (Center LS) Robbery Spot
{377.797363, -67.435653, 1001.507812, 3.0}, // Burger Shot Robbery Spot
{1176.014282, -1323.302246, 14.000391, 3.0}, // Hospital
{-201.742660, -23.566627, 1002.273437, 3.0}, // Tatoo Shop
{2486.337646, -1644.873291, 14.077178, 3.0}, // House 1
{235.373641, 1186.680053, 1080.257812, 3.0}, // House 1 Exit
{1980.387695, -1719.006713, 17.030405, 3.0}, // House2Enter
{228.089996, 1114.303955, 1080.992187, 3.0}, // House2 Exit
{280.929382, -1767.145751, 4.546875, 3.0}, // House3enter
{223.038757, 1288.227294, 1082.140625, 3.0}, // House3Exit
{189.641677, -1308.114135, 70.249511, 3.0}, // House4Enter
{24.116802, 1340.033691, 1084.375000, 3.0}, // House4Exit
{352.405242, -1197.921020, 76.515625, 3.0}, // House5Enter
{22.747611, 1404.215698, 1084.429687, 3.0}, // House5Exit inside
{989.783447, -828.658874, 95.468574, 3.0}, // House 6 enter
{447.005004, 1397.073608, 1084.304687, 3.0}, // House Exit to outside
{1094.829467, -647.912902, 113.648437, 3.0}, // House 7 enter
{234.166671, 1065.024414, 1084.210327, 3.0}, // House 7 Exit
{2090.942626, -1277.854370, 26.179687, 3.0}, // House 8 enter loc
{2259.523193, -1135.836303, 1050.632812, 3.0},// House 8 Exit Cp (THIS ONE)
{2111.024902, -1244.397460, 25.851562, 3.0}, // House9Enter
{2467.589111, -1698.400024, 1013.507812, 3.0}, // House 9 Exit CP
{1214.997924, -13.298475, 1000.921875, 3.0}, // Pig Pen Robbery Spot
{2034.464721, -1406.565551, 17.205287, 3.0}, // hospital
{1440.501220, -2287.199462, 13.546875, 3.0},// Airpot blow cp
{363.255249, -2009.069458, 7.835937, 3.0}, // park cp for blow
{-31.306764, -28.996454, 1003.557250, 3.0}, // Gas Station Rob
{1401.436889, -767.322265, 95.011589, 3.0}, // Vinewood sign blow cp
{1526.515136, -1071.242065, 25.062500, 3.0}, // Blow bank CP
{2147.707763, -1367.095458, 25.641782, 3.0}, // Drug house cp
{203.934204, -40.282241, 1001.804687, 3.0}, // SubUrban robbery checkpoint
{207.757797, -98.696815, 1005.257812, 3.0}, // Binco rob
{376.704528, -118.806343, 1001.499511, 3.0}, // Pizza place robbery
{1642.319335, -2237.777832, 13.498379, 3.0}, // Airport
{-1422.704101, -286.657531, 14.148437, 3.0}, // SF Airport cp
{1674.765625, 1447.695068, 10.789379, 3.0} // LV Airport
};

new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //69 Cent Store
{242.375991, 103.245994, 250.375991, 113.245994},//SFPD Exit
{1480.7555,-1777.3855 , 1485.7555, -1766.3855}, //CP_PrisonEnter
{1506.011352, -1064.139526, 1514.011352, -1056.139526}, // bank
{2300.7012, -24.0591, 2308.7012, -12.0591}, //CP BANK EXIT
{2307.645019, -8.784074, 2315.645019, -0.784075}, // Inside Bank
{2170.755615, -2253.109130, 2178.755615, -2245.109130}, //Explosives
{973.451416, -773.852722, 981.451416, -765.852722}, // Admin House
{2313.830322, -1030.757690, 2321.830322, -1022.757690}, //Admin House Exit
{1926.014160, -2126.011474, 1950.014160, -2106.011474}, //Sex Shop enter
{-114.511611, -33.429290, -90.511611, -13.429288}, // Sex Shop Exit
{-119.566085, -20.617439, -95.566085, -0.617439}, // Sex Shop Counter
{1914.582031, -1786.320434, 1938.582031, -1766.320434}, // Gas Station Enter
{-24.311285, -188.242904, -0.311285, -168.242904}, // Gas station checkpoint
{-40.028060, -197.120574, -16.028060, -177.120574}, // Store one exit
{462.096069, -25.185485, 486.096069, -5.185485}, // dance Rob
{279.810852, -44.787994, 303.810852, -24.787994}, // Ammunation (Center LS) Robbery Spot
{363.797363, -77.435653, 387.797363, -57.435653}, // Burger Shot Robbery Spot
{1166.014282, -1333.302246, 1186.014282, -1313.302246}, // Hospital
{-211.742660, -33.566627, -191.742660, -13.566627}, // Tatoo Shop
{2476.337646, -1654.873291, 2496.337646, -1634.873291}, // House 1
{225.373641, 1176.680053, 245.373641, 1196.680053}, // House 1 Exit
{1970.387695, -1729.006713, 1990.387695, -1709.006713}, // House2Enter
{218.089996, 1104.303955, 238.089996, 1124.303955}, // House2 Exit
{270.929382, -1777.145751, 290.929382, -1757.145751}, // House3enter
{213.038757, 1278.227294, 233.038757, 1298.227294}, // House3Exit
{179.641677, -1318.114135, 199.641677, -1298.114135}, // House4Enter
{14.116802, 1330.033691, 34.116802, 1350.033691}, // House4Exit
{342.405242, -1207.921020, 362.405242, -1187.921020}, // House5Enter
{12.747611, 1394.215698, 32.747611, 1414.215698}, // House5Exit inside
{979.783447, -838.658874, 999.783447, -818.658874}, // House 6 enter
{437.005004, 1387.073608, 457.005004, 1407.073608}, // House Exit to outside
{1084.829467, -657.912902, 1104.829467, -637.912902}, // House 7 enter
{224.166671, 1055.024414, 244.166671, 1075.024414}, // House 7 Exit
{2080.942626, -1287.854370, 2100.942626, -1267.854370}, // House 8 enter loc
{2249.523193, -1145.836303, 2269.523193, -1125.836303}, // House 8 Exit Cp (THIS ONE)
{2101.024902, -1254.397460, 2121.024902, -1234.397460}, // House9Enter
{2457.589111, -1708.400024, 2477.589111, -1688.400024}, // House 9 Exit CP
{1204.997924, -23.298475, 1224.997924, -3.298475}, // Pig Pen Robbery Spot
{2024.464721, -1416.565551, 2044.464721, -1396.565551},// hospital
{1430.501220, -2297.199462, 1450.501220, -2277.199462}, // Airpot blow cp
{353.255249, -2019.069458, 373.255249, -1999.069458}, // park cp for blow
{-41.306762, -38.996452, -21.306764, -18.996454}, // Gas Station Rob
{1391.436889, -777.322265, 1411.436889, -757.322265}, // Vinewood sign blow cp
{1516.515136, -1081.242065, 1536.515136, -1061.242065}, // Blow bank CP
{2137.707763, -1377.095458, 2157.707763, -1357.095458}, // Drug house cp
{193.934204, -50.282241, 213.934204, -30.282241}, // SubUrban robbery checkpoint
{197.757797, -108.696815, 217.757797, -88.696815}, // Binco rob
{366.704528, -128.806335, 386.704528, -108.806343}, // Pizza place robbery
{1592.319335, -2287.777832, 1692.319335, -2187.777832}, // Airport
{-1472.704101, -336.657531, -1372.704101, -236.657531}, // SF Airport cp
{1624.765625, 1397.695068, 1724.765625, 1497.695068} // LV Airport
};
Reply
#4

Door de define 'MAX_POINTS' dezelfde waarde te geven als dat er regels in de array 'checkPoints' staan.
Reply
#5

dus zo:
#define MAX_POINTS 4

hij stond op #define MAX_POINTS 52

als ik die op 4 zet krijg ik dit:
Code:
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(301) : error 018: initialization data exceeds declared size
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(332) : error 010: invalid function or declaration
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(338) : error 018: initialization data exceeds declared size
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(369) : error 010: invalid function or declaration
C:\Users\Henk\Desktop\zombiw\gamemodes\1.2.pwn(406) : error 018: initialization data exceeds declared size
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#6

Quote:
Originally Posted by 2jesper2
View Post
dus zo:
#define MAX_POINTS 4

hij stond op #define MAX_POINTS 52
Nee, je moet het aantal regels die de array bevat tellen, wat je nu hebt gedaan is alle array dimensies tellen.
Reply
#7

Quote:
Originally Posted by Danny.
View Post
Nee, je moet het aantal regels die de array bevat tellen, wat je nu hebt gedaan is alle array dimensies tellen.
bedankt het is opgelost
Reply
#8

oke, ik heb dus nog iets,
ik probeer het huis systeem er uit te halen van ls cnr van karagon
alleen nu krijg ik 26 errors ofzo
terwijl alles er goed uit ziet.
Code:
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1232) : error 004: function "ResetGVars" is not implemented
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1325) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1327) : error 017: undefined symbol "PlayerName"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1330) : error 017: undefined symbol "LogPlayer"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1332) : error 017: undefined symbol "PlayerName"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1335) : error 017: undefined symbol "RegisterPlayer"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1371) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1372) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1373) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1377) : error 004: function "RemoveVariables" is not implemented
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1385) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1393) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1396) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1451) : error 017: undefined symbol "SelectSkill"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1461) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1492) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1496) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1502) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1504) : error 004: function "DecreaseScore" is not implemented
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1512) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1515) : error 004: function "DecreaseScore" is not implemented
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1520) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1523) : error 004: function "DecreaseScore" is not implemented
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1528) : error 017: undefined symbol "PlayerInfo"
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1531) : error 004: function "IncreaseScore" is not implemented
C:\Users\***\Desktop\zombiw\gamemodes\1.2.pwn(1537) : error 017: undefined symbol "PlayerInfo"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
de hele code:
http://www.jespersweb.nl/code.txt

ik zou het erg aardig vinden als iemand me kon helpen met deze grote errors,
je krijgt dan ook zeker een rep
Reply
#9

Haakje vergeten
Reply
#10

Quote:
Originally Posted by Jochemd
View Post
Haakje vergeten
waar? ;o
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)