SA-MP Forums Archive
Arrays 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: Arrays error (/showthread.php?tid=356577)



Arrays error - iProdigy - 04.07.2012

PAWNO Error and unaware how to fix.

Error:


C:\Users\x\x\x\gamemodes\x.pwn(233) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Lines 225-233:

new Announcements[8][128] = {
"[BOT] Welcome to x, feel free to ask questions. (/ask)",
"[BOT] Like our server? Want to keep us online? Be sure to donate!",
"[BOT] Visit our forum to keep up to date! x",
"[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
"[BOT] We hand pick our staff, so please refrain from asking us for a position.",
"[BOT] Spot a hacker? Use /report",
"[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};


Re: Arrays error - Gangster-rocks - 04.07.2012

Next time use [pawn][/pawn.] remove the .
Try that
pawn Код:
new Announcements[8][128] =
{
"[BOT] Welcome to x, feel free to ask questions. (/ask)",
"[BOT] Like our server? Want to keep us online? Be sure to donate!",
"[BOT] Visit our forum to keep up to date! x",
"[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
"[BOT] We hand pick our staff, so please refrain from asking us for a position.",
"[BOT] Spot a hacker? Use /report",
"[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};
here you go.


Re: Arrays error - iProdigy - 04.07.2012

Quote:
Originally Posted by Gangster-rocks
Посмотреть сообщение
Next time use [pawn][/pawn.] remove the .
Try that
pawn Код:
new Announcements[8][128] =
{
"[BOT] Welcome to x, feel free to ask questions. (/ask)",
"[BOT] Like our server? Want to keep us online? Be sure to donate!",
"[BOT] Visit our forum to keep up to date! x",
"[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
"[BOT] We hand pick our staff, so please refrain from asking us for a position.",
"[BOT] Spot a hacker? Use /report",
"[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};
here you go.
Thank you for the tip. Although I appreciate your go, I'm still getting the same error.

C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(234) : error 052: multi-dimensional arrays must be fully initialized
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

pawn Код:
new Announcements[8][128] =
{
"[BOT] Welcome to x, feel free to ask questions. (/ask)",
"[BOT] Like our server? Want to keep us online? Be sure to donate!",
"[BOT] Visit our forum to keep up to date! x",
"[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
"[BOT] We hand pick our staff, so please refrain from asking us for a position.",
"[BOT] Spot a hacker? Use /report",
"[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};



Re: Arrays error - Gangster-rocks - 04.07.2012

pawn Код:
new Announcements[8][128] =
{
     "[BOT] Welcome to x, feel free to ask questions. (/ask)",
     "[BOT] Like our server? Want to keep us online? Be sure to donate!",
     "[BOT] Visit our forum to keep up to date! x",
     "[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
     "[BOT] We hand pick our staff, so please refrain from asking us for a position.",
     "[BOT] Spot a hacker? Use /report",
     "[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};
try this one.
Edit:
use this FS is greate http://forum.sa-mp.com/showthread.ph...andom+messages


Re: Arrays error - iProdigy - 04.07.2012

Unfortunately, still no.


Re: Arrays error - iProdigy - 04.07.2012

Quote:
Originally Posted by Gangster-rocks
Посмотреть сообщение
pawn Код:
new Announcements[8][128] =
{
     "[BOT] Welcome to x, feel free to ask questions. (/ask)",
     "[BOT] Like our server? Want to keep us online? Be sure to donate!",
     "[BOT] Visit our forum to keep up to date! x",
     "[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
     "[BOT] We hand pick our staff, so please refrain from asking us for a position.",
     "[BOT] Spot a hacker? Use /report",
     "[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};
try this one.
Edit:
use this FS is greate http://forum.sa-mp.com/showthread.ph...andom+messages
I'll use this if no-one else can help. Thank you.


Re: Arrays error - Niko_boy - 04.07.2012

new Announcements[8][128] =
isnt it supposed to be 7 ?


Re: Arrays error - iProdigy - 04.07.2012

Quote:
Originally Posted by Niko_boy
Посмотреть сообщение
new Announcements[8][128] =
isnt it supposed to be 7 ?
Well, when I do that I'm left with this error.


C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(22313) : error 032: array index out of bounds (variable "Announcements")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: Arrays error - Universal - 04.07.2012

pawn Код:
new Announcements[8][] =
{
     "[BOT] Welcome to x, feel free to ask questions. (/ask)",
     "[BOT] Like our server? Want to keep us online? Be sure to donate!",
     "[BOT] Visit our forum to keep up to date! x",
     "[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
     "[BOT] We hand pick our staff, so please refrain from asking us for a position.",
     "[BOT] Spot a hacker? Use /report",
     "[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};
Not quite sure, but give it a try.


Re: Arrays error - iProdigy - 04.07.2012

Quote:
Originally Posted by Universal
Посмотреть сообщение
pawn Код:
new Announcements[8][] =
{
     "[BOT] Welcome to x, feel free to ask questions. (/ask)",
     "[BOT] Like our server? Want to keep us online? Be sure to donate!",
     "[BOT] Visit our forum to keep up to date! x",
     "[BOT] Please refrain from asking admins about skin changes. Use the Binco!",
     "[BOT] We hand pick our staff, so please refrain from asking us for a position.",
     "[BOT] Spot a hacker? Use /report",
     "[BOT] Are you a fan of this server? Be sure to add us to your favorites!"
};
Not quite sure, but give it a try.
That gives me these errors:
pawn Код:
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(233) : error 052: multi-dimensional arrays must be fully initialized
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(2125) : error 017: undefined symbol "Msg"
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(2125) : warning 215: expression has no effect
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(22302) : error 017: undefined symbol "Msg"
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(22303) : error 017: undefined symbol "Msg"
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(22303) : error 017: undefined symbol "Msg"
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(22303) : warning 215: expression has no effect
C:\Users\Admim\Desktop\TWD-RP\gamemodes\newZombie.pwn(22305) : error 010: invalid function or declaration
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
But that is most likely because I edited the other part to what I was given. Reckon I should revert it back?