SA-MP Forums Archive
1 error -_- - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 1 error -_- (/showthread.php?tid=489499)



1 error -_- - iThePunisher - 22.01.2014

i have got this error
pawn Код:
C:\Users\hacker\Desktop\lscnr script\gamemodes\teaching.pwn(315) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
here is the place where is the error
pawn Код:
new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //=
{242.375991, 103.245994, 250.375991, 113.245994},//=
{1480.7555,-1777.3855 , 1485.7555, -1766.3855}, //=
{1506.011352, -1064.139526, 1514.011352, -1056.139526}, //=
{2300.7012, -24.0591, 2308.7012, -12.0591}, //=
{2307.645019, -8.784074, 2315.645019, -0.784075}, // =
{2170.755615, -2253.109130, 2178.755615, -2245.109130}, //=
{-114.511611, -33.429290, -90.511611, -13.429288}, // =
{-119.566085, -20.617439, -95.566085, -0.617439}, // =
{1914.582031, -1786.320434, 1938.582031, -1766.320434}, // =
{-24.311285, -188.242904, -0.311285, -168.242904}, // =
{-40.028060, -197.120574, -16.028060, -177.120574}, //=
{462.096069, -25.185485, 486.096069, -5.185485}, //
{279.810852, -44.787994, 303.810852, -24.787994}, // =
{363.797363, -77.435653, 387.797363, -57.435653}, // =
{1166.014282, -1333.302246, 1186.014282, -1313.302246}, // =
{-211.742660, -33.566627, -191.742660, -13.566627}, // =
{1204.997924, -23.298475, 1224.997924, -3.298475}, // =
{2024.464721, -1416.565551, 2044.464721, -1396.565551},// =
{1430.501220, -2297.199462, 1450.501220, -2277.199462}, // =
{353.255249, -2019.069458, 373.255249, -1999.069458}, // =
{-41.306762, -38.996452, -21.306764, -18.996454}, // =
{1391.436889, -777.322265, 1411.436889, -757.322265}, // =
{1516.515136, -1081.242065, 1536.515136, -1061.242065}, // =
{2137.707763, -1377.095458, 2157.707763, -1357.095458}, //=
{193.934204, -50.282241, 213.934204, -30.282241}, // =
{197.757797, -108.696815, 217.757797, -88.696815}, // =
{366.704528, -128.806335, 386.704528, -108.806343}, // =
{1592.319335, -2287.777832, 1692.319335, -2187.777832}, // =
{-1472.704101, -336.657531, -1372.704101, -236.657531}, //=
{1624.765625, 1397.695068, 1724.765625, 1497.695068} //==
};



Re: 1 error -_- - Krakuski - 22.01.2014

Try to change [MAX_POINTS][4] to [MAX_POINTS][32]


Re: 1 error -_- - MP2 - 22.01.2014

Change

new checkCoords[MAX_POINTS][4]

to

new checkCoords[][]

and let the compiler figure out how many cells are needed.


Re: 1 error -_- - nguyenquynh - 22.01.2014

Quote:
Originally Posted by MP2
Посмотреть сообщение
Change

new checkCoords[MAX_POINTS][4]

to

new checkCoords[][]

and let the compiler figure out how many cells are needed.
Hey u can help me


https://sampforum.blast.hk/showthread.php?tid=489481


Re : 1 error -_- - EthanMason - 22.01.2014

Checkpoints can only have 3 points which are X, Y and Z but you're having four.


Reply - Error - Eizen - 22.01.2014

Try changing this:

Код:
new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //=
{242.375991, 103.245994, 250.375991, 113.245994},//=
{1480.7555,-1777.3855 , 1485.7555, -1766.3855}, //=
{1506.011352, -1064.139526, 1514.011352, -1056.139526}, //=
{2300.7012, -24.0591, 2308.7012, -12.0591}, //=
{2307.645019, -8.784074, 2315.645019, -0.784075}, // =
{2170.755615, -2253.109130, 2178.755615, -2245.109130}, //=
{-114.511611, -33.429290, -90.511611, -13.429288}, // =
{-119.566085, -20.617439, -95.566085, -0.617439}, // =
{1914.582031, -1786.320434, 1938.582031, -1766.320434}, // =
{-24.311285, -188.242904, -0.311285, -168.242904}, // =
{-40.028060, -197.120574, -16.028060, -177.120574}, //=
{462.096069, -25.185485, 486.096069, -5.185485}, // 
{279.810852, -44.787994, 303.810852, -24.787994}, // =
{363.797363, -77.435653, 387.797363, -57.435653}, // =
{1166.014282, -1333.302246, 1186.014282, -1313.302246}, // =
{-211.742660, -33.566627, -191.742660, -13.566627}, // =
{1204.997924, -23.298475, 1224.997924, -3.298475}, // =
{2024.464721, -1416.565551, 2044.464721, -1396.565551},// =
{1430.501220, -2297.199462, 1450.501220, -2277.199462}, // =
{353.255249, -2019.069458, 373.255249, -1999.069458}, // =
{-41.306762, -38.996452, -21.306764, -18.996454}, // =
{1391.436889, -777.322265, 1411.436889, -757.322265}, // =
{1516.515136, -1081.242065, 1536.515136, -1061.242065}, // =
{2137.707763, -1377.095458, 2157.707763, -1357.095458}, //=
{193.934204, -50.282241, 213.934204, -30.282241}, // =
{197.757797, -108.696815, 217.757797, -88.696815}, // =
{366.704528, -128.806335, 386.704528, -108.806343}, // =
{1592.319335, -2287.777832, 1692.319335, -2187.777832}, // =
{-1472.704101, -336.657531, -1372.704101, -236.657531}, //=
{1624.765625, 1397.695068, 1724.765625, 1497.695068} //==
};
To this:

Код:
new Float:checkCoords[31][3] = 
{
{-32.100069,-94.627357,-24.100069},
{242.375991, 103.245994, 250.375991},
{1480.7555,-1777.3855 , 1485.7555},
{1506.011352, -1064.139526, 1514.011352,
{2300.7012, -24.0591, 2308.7012},
{2307.645019, -8.784074, 2315.645019},
{2170.755615, -2253.109130, 2178.755615},
{-114.511611, -33.429290, -90.511611},
{-119.566085, -20.617439, -95.566085},
{1914.582031, -1786.320434, 1938.582031},
{-24.311285, -188.242904, -0.311285},
{-40.028060, -197.120574, -16.028060},
{462.096069, -25.185485, 486.096069}, 
{279.810852, -44.787994, 303.810852},
{363.797363, -77.435653, 387.797363},
{1166.014282, -1333.302246, 1186.014282,
{-211.742660, -33.566627, -191.742660},
{1204.997924, -23.298475, 1224.997924},
{2024.464721, -1416.565551, 2044.464721},
{1430.501220, -2297.199462, 1450.501220},
{353.255249, -2019.069458, 373.255249},
{-41.306762, -38.996452, -21.306764},
{1391.436889, -777.322265, 1411.436889},
{1516.515136, -1081.242065, 1536.515136},
{2137.707763, -1377.095458, 2157.707763},
{193.934204, -50.282241, 213.934204},
{197.757797, -108.696815, 217.757797},
{366.704528, -128.806335, 386.704528},
{1592.319335, -2287.777832, 1692.319335},
{-1472.704101, -336.657531, -1372.704101},
{1624.765625, 1397.695068, 1724.765625}
};
You were using 4 coords and there are just 3 coords.

If not you can also try this:

Код:
new Float:checkCoords[31][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, 
{242.375991, 103.245994, 250.375991, 113.245994},
{1480.7555,-1777.3855 , 1485.7555, -1766.3855},
{1506.011352, -1064.139526, 1514.011352, -1056.139526},
{2300.7012, -24.0591, 2308.7012, -12.0591},
{2307.645019, -8.784074, 2315.645019, -0.784075},
{2170.755615, -2253.109130, 2178.755615, -2245.109130},
{-114.511611, -33.429290, -90.511611, -13.429288},
{-119.566085, -20.617439, -95.566085, -0.617439},
{1914.582031, -1786.320434, 1938.582031, -1766.320434},
{-24.311285, -188.242904, -0.311285, -168.242904},
{-40.028060, -197.120574, -16.028060, -177.120574},
{462.096069, -25.185485, 486.096069, -5.185485},
{279.810852, -44.787994, 303.810852, -24.787994},
{363.797363, -77.435653, 387.797363, -57.435653},
{1166.014282, -1333.302246, 1186.014282, -1313.302246},
{-211.742660, -33.566627, -191.742660, -13.566627},
{1204.997924, -23.298475, 1224.997924, -3.298475},
{2024.464721, -1416.565551, 2044.464721, -1396.565551},
{1430.501220, -2297.199462, 1450.501220, -2277.199462},
{353.255249, -2019.069458, 373.255249, -1999.069458},
{-41.306762, -38.996452, -21.306764, -18.996454},
{1391.436889, -777.322265, 1411.436889, -757.322265},
{1516.515136, -1081.242065, 1536.515136, -1061.242065},
{2137.707763, -1377.095458, 2157.707763, -1357.095458},
{193.934204, -50.282241, 213.934204, -30.282241},
{197.757797, -108.696815, 217.757797, -88.696815},
{366.704528, -128.806335, 386.704528, -108.806343},
{1592.319335, -2287.777832, 1692.319335, -2187.777832},
{-1472.704101, -336.657531, -1372.704101, -236.657531},
{1624.765625, 1397.695068, 1724.765625, 1497.695068}
};
I hope it helps you


Re: 1 error -_- - billy123321 - 23.01.2014

Attempting to make your own LSCnR I see, good luck.


Re: 1 error -_- - PowerPC603 - 23.01.2014

How much is your MAX_POINTS?
It should be 31, as you have 31 sets of coordinates.

Also, 4 coordinates could be correct.
It seems he's declaring zones with this array, using Xmin, Ymin, Xmax, Ymax.
The first and third coords are nearly the same, and the second and fourth as well.

If you plan to add some more zones to this array, I suggest you use
pawn Код:
new Float:checkCoords[][] = {
To allow the compiler to figure out how much zones you have declared.
Otherwise you need to adjust your MAX_POINTS variable every time you add/remove a zone to/from the array.


Re: 1 error -_- - iThePunisher - 23.01.2014

ty you all for your help i will try to give reputation to all