SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 22/01/2014, 09:28 PM   #1
iThePunisher
Huge Clucker
 
iThePunisher's Avatar
 
Join Date: Nov 2013
Location: "The Wolf's Lair"
Posts: 458
Reputation: 27
Default 1 error -_-

i have got this error
pawn Code:
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 Code:
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} //==
};
iThePunisher is offline   Reply With Quote
Old 22/01/2014, 09:32 PM   #2
Krakuski
Huge Clucker
 
Krakuski's Avatar
 
Join Date: Jul 2012
Location: Japan
Posts: 200
Reputation: 18
Default Re: 1 error -_-

Try to change [MAX_POINTS][4] to [MAX_POINTS][32]
Krakuski is offline   Reply With Quote
Old 22/01/2014, 09:34 PM   #3
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,230
Reputation: 993
Default Re: 1 error -_-

Change

new checkCoords[MAX_POINTS][4]

to

new checkCoords[][]

and let the compiler figure out how many cells are needed.
__________________
Click banner above for more info. View trailers here.
Enter referral code SAMPFORUM after registering for a $5000 starting bonus!
MP2 is offline   Reply With Quote
Old 22/01/2014, 09:37 PM   #4
nguyenquynh
Banned
 
Join Date: Sep 2012
Posts: 94
Reputation: 0
Default Re: 1 error -_-

Quote:
Originally Posted by MP2 View Post
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


http://forum.sa-mp.com/showthread.php?t=489481
nguyenquynh is offline   Reply With Quote
Old 22/01/2014, 09:41 PM   #5
EthanMason
Little Clucker
 
Join Date: Apr 2013
Posts: 37
Reputation: 5
Default Re : 1 error -_-

Checkpoints can only have 3 points which are X, Y and Z but you're having four.
EthanMason is offline   Reply With Quote
Old 22/01/2014, 11:11 PM   #6
Eizen
Little Clucker
 
Eizen's Avatar
 
Join Date: Dec 2013
Posts: 11
Reputation: 1
Exclamation Reply - Error

Try changing this:

Code:
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:

Code:
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:

Code:
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
Eizen is offline   Reply With Quote
Old 23/01/2014, 01:22 AM   #7
billy123321
Big Clucker
 
billy123321's Avatar
 
Join Date: Dec 2011
Posts: 55
Reputation: 4
Default Re: 1 error -_-

Attempting to make your own LSCnR I see, good luck.
__________________
Meh.
billy123321 is offline   Reply With Quote
Old 23/01/2014, 08:31 AM   #8
PowerPC603
High-roller
 
Join Date: Nov 2010
Location: Belgium
Posts: 1,734
Reputation: 238
Default Re: 1 error -_-

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 Code:
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.
__________________
Gamemode: PPC_Trucking
Extras-file (for PPC_Trucking): /delproperty, /evict, /propertyid, /porthouse, /portbus, /properties
------------------------------------------------------------------------------------
PPC-Trucking-V2 (home-hosted, only open on occasion for testing purposes): ppctruckingv2.no-ip.info:7777
Youtube channel: https://www.youtube.com/channel/UC-4...Mpglma8f0Ld-YQ
------------------------------------------------------------------------------------
Filterscripts: PPC_Speedometer - PPC_Housing - PPC_Business
PowerPC603 is offline   Reply With Quote
Old 23/01/2014, 12:28 PM   #9
iThePunisher
Huge Clucker
 
iThePunisher's Avatar
 
Join Date: Nov 2013
Location: "The Wolf's Lair"
Posts: 458
Reputation: 27
Default Re: 1 error -_-

ty you all for your help i will try to give reputation to all
iThePunisher is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error 111: user error: sscanf (possibly the PAWN version) already defined? minijackc Scripting Help 2 15/01/2013 05:17 AM
An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds.... rati555 Scripting Help 1 14/09/2012 08:45 PM
Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' Deal-or-die Scripting Help 2 25/06/2012 04:12 PM
Error message: : error 030: compound statement not closed at the end of file (started at line 170) the_zohan Scripting Help 5 04/06/2012 09:38 AM
I get tagmismatch error, But i cant find any error error Swiftz Help Archive 1 16/04/2011 05:31 AM


All times are GMT. The time now is 12:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.