error 018: initialization data exceeds declared size
#1

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}
Reply
#2

Can anyone help...?
Reply
#3

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.
Reply
#4

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.
Reply
#5

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.
Reply
#6

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
};

Reply
#7

Try this.

PHP код:
new Float:gDealersSP][ ] = {
Line 475 = {1930.5126, -1776.100819.116713.5469270.7779},//done
{1930.5126, -1776.100819.116713.5469270.7779},//done
{1930.5126, -1776.100819.116713.5469270.7779},//done
{1930.5126, -1776.100819.116713.5469270.7779},//done
{1930.5126, -1776.100819.116713.5469270.7779//done
}; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)