multi-dimensional arrays must be fully initialized
#1

Hey every1 hope everything is fine...i'm having this problem can anyone fix this?
Here is the error
Код:
C:\Users\NAEEM\Desktop\FR 2013\pawno\XS.pwn(75) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And the code

Код:
//Anounncements
new Msg;
new Announcements[6][128] = { // Announcements[number of announcement messages][string lengh]
"{FF0000}SerVer >> {FF00E6}To teleport around, type {FFFF00}/teles",
"{FF0000}SerVer >> {FF00E6}Make sure to visit our web - {FFFF00}www.ngenstunting.com",
"{FF0000}SerVer >> {FF00E6}Basic: {FFFF00}/help {FFFFFF}- {FFFF00}/rules {FFFFFF}- {FFFF00}/t {FFFFFF}- {FFFF00}/v",
"{FF0000}SerVer >> {FF00E6}Donate our server,To keep our server alive"
};
error is happening on the red
If u need more detail please do ask on the reply...
Reply
#2

It's pretty much what it says. You haven't initialized 128 items, so just remove it.

pawn Код:
new Announcements[6][] =
Reply
#3

pawn Код:
new Announcements[][] = { // Announcements[number of announcement messages][string lengh]
"{FF0000}SerVer >> {FF00E6}To teleport around, type {FFFF00}/teles",
"{FF0000}SerVer >> {FF00E6}Make sure to visit our web - {FFFF00}www.ngenstunting.com",
"{FF0000}SerVer >> {FF00E6}Basic: {FFFF00}/help {FFFFFF}- {FFFF00}/rules {FFFFFF}- {FFFF00}/t {FFFFFF}- {FFFF00}/v",
"{FF0000}SerVer >> {FF00E6}Donate our server,To keep our server alive"
};
You used 6 but you have only 4 messages. Removing the size completely won't give any error for this again (in the future since you may add/remove messages).
Reply
#4

Try this:
pawn Код:
//Anounncements
new Msg;
new Announcements[5][] = { // Announcements[number of announcement messages][string lengh]
"{FF0000}SerVer >> {FF00E6}To teleport around, type {FFFF00}/teles",
"{FF0000}SerVer >> {FF00E6}Make sure to visit our web - {FFFF00}www.ngenstunting.com",
"{FF0000}SerVer >> {FF00E6}Basic: {FFFF00}/help {FFFFFF}- {FFFF00}/rules {FFFFFF}- {FFFF00}/t {FFFFFF}- {FFFF00}/v",
"{FF0000}SerVer >> {FF00E6}Donate our server,To keep our server alive"
};
Reply


Forum Jump:


Users browsing this thread: