error 018: initialization data exceeds declared size -
RuvExArisa - 01.04.2016
Error
Код:
C:\Users\Sivvy\Desktop\Cust. Pawno\LuxAdmin.pwn(223) : error 018: initialization data exceeds declared size
Pawn compiler 3.10.20150531 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Code/Line
Код:
{""#RegisterCommand"",-1},{""#LoginCommand"",-1},{""#ChangePassCommand"",-1}
Re: error 018: initialization data exceeds declared size -
RuvExArisa - 01.04.2016
Can anyone help...?
Re: error 018: initialization data exceeds declared size -
Vince - 01.04.2016
You're trying to put more data into an array than you designed it to hold. Can't give exact information because you're neither showing the array declaration, nor the length of the actual strings you're trying to put it in.
Re: error 018: initialization data exceeds declared size -
RuvExArisa - 01.04.2016
Well I had showed the line that the error was on? Where would the array be? Would it be this:
Quote:
enum e_Register {
sCommand[12],
CommandLen
}
new RegisterCommands[3][e_Register]= {
{""#RegisterCommand"",-1},{""#LoginCommand"",-1},{""#ChangePassCommand"",-1}
};
|
Cause this is where it says the error is.
Re: error 018: initialization data exceeds declared size -
Banana_Ghost - 02.04.2016
One of your defines such as:
pawn Код:
#define RegisterCommand "yoloyoloyolo"
has more 11 characters (you made an array to hold 12 characters (11 + the null character)).
To get rid of this error, either shorten your defined strings or increase your "sCommand" array inside of your enumerator to hold the length of the string + the null character.
Re: error 018: initialization data exceeds declared size -
RuvExArisa - 03.04.2016
Okay I solved that but now, I have a new error which I think is the same as above.
Error:
Quote:
C:\Users\*****\Desktop\Cust. Pawno\GWDMv2.pwn(475) : error 018: initialization data exceeds declared size
|
Code/Error line:
Quote:
new Float:gDealersSP[ 5 ][ 4 ] = {
Line 475 = {1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779} //done
};
|
Re: error 018: initialization data exceeds declared size -
Karan007 - 03.04.2016
Try this.
PHP код:
new Float:gDealersSP[ 5 ][ 5 ] = {
Line 475 = {1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779},//done
{1930.5126, -1776.1008, 19.1167, 13.5469, 270.7779} //done
};