Error: 032 & 052 - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error: 032 & 052 (
/showthread.php?tid=144741)
Error: 032 & 052 -
Toni - 28.04.2010
Hey there, new project i'm making (see in my sig)
I'm using Seif_'s Announcement thing, but i added a few more lines...but there are some problems,
error 032: array index out of bounds (variable "Announcements")
- That is the first error when i do this
pawn Код:
new Announcements
[8][128] = { // Announcements[number of announcement messages][string lengh]"Announcement: Visit Our Forums! Go to http://rayze-universe.tk",
"Announcement: Want to Stay with us? Add » 99.58.71.127:7777 « To your Favourites!",
"Announcement: Want to be a V.I.P Member? Pay only $10 and become V.I.P for life! (/vip)",
"Announcement: Want to know who is the developer of Party For Life! [P.F.R]? use /credits",
"Announcement: New to this server? Use /help or /commands. Also Please Register on our forums (/website)",
"Announcement: Want to be a Admin? Applicate on our forums, but Please Read our rules before doing so.",
"Announcement: Feel Free to invite your friends to Party For Life! We will have great thanks to you",
"Announcement: Do you have Ideas for this server? Go to our Ideas - Bugs - Complaints section and post!"};
and the other part
pawn Код:
public GlobalAnnouncement()
{
switch (Msg)
{
case 0: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[0]); Msg++;} // first message
case 1: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[1]); Msg++;}
case 2: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[2]); Msg++;}
case 3: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[3]); Msg++;}
case 4: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[4]); Msg++;}
case 5: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[5]); Msg++;}
case 6: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[6]); Msg++;}
case 7: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[7]); Msg++;}
case 8: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[8]); Msg = 0;} // last message
}
return 1;
}
Thats the First Error
But when i change
pawn Код:
new Announcements[8][128] = { // Announcements[number of announcement messages][string lengh]
to
pawn Код:
new Announcements[10][128] = { // Announcements[number of announcement messages][string lengh]
It gives me this error:
error 052: multi-dimensional arrays must be fully initialized
And thats all i changed...Please Help.
Re: Error: 032 & 052 -
Toni - 28.04.2010
Quote:
Originally Posted by Seif_
pawn Код:
public GlobalAnnouncement() { switch (Msg) { case 0: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[0]); Msg++;} // first message case 1: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[1]); Msg++;} case 2: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[2]); Msg++;} case 3: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[3]); Msg++;} case 4: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[4]); Msg++;} case 5: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[5]); Msg++;} case 6: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[6]); Msg++;} case 7: {SendClientMessageToAll(ANNOUNCEMENT, Announcements[7]); Msg = 0;} // last message } return 1; }
|
Oh..Uhm mind i ask what was actualy wrong?
EDIT:
Still have the same error.
Re: Error: 032 & 052 -
dcmd_crash - 28.04.2010
Lmao, why you doing that?! :P
Re: Error: 032 & 052 -
Toni - 28.04.2010
Quote:
Originally Posted by _❼_
Lmao, why you doing that?! :P
|
Because I can?
Re: Error: 032 & 052 -
dcmd_crash - 28.04.2010
Quote:
Originally Posted by Tɧ϶ Tσηί™
Quote:
Originally Posted by _❼_
Lmao, why you doing that?! :P
|
Because I can? 
|
Lol .. I mean, you don't actually do that in your script do you? That's probably what's causing the error lol.
Re: Error: 032 & 052 -
Toni - 28.04.2010
Quote:
Originally Posted by _❼_
Quote:
Originally Posted by Tɧ϶ Tσηί™
Quote:
Originally Posted by _❼_
Lmao, why you doing that?! :P
|
Because I can? 
|
Lol .. I mean, you don't actually do that in your script do you? That's probably what's causing the error lol.
|
What? How would that cause a problem? its in quotations...so not the problem.
Re: Error: 032 & 052 -
dcmd_crash - 28.04.2010
Look..
pawn Код:
new Announcements
[8][128] = { // Announcements[number of announcement messages][string lengh]"Announcement: Visit Our Forums! Go to http://rayze-universe.lol",
"Announcement: Want to Stay with us? Add » 99.58.71.127:7777 « To your Favourites!",
"Announcement: Want to be a V.I.P Member? Pay only $10 and become V.I.P for life! (/vip)",
"Announcement: Want to know who is the developer of Party For Life! [P.F.R]? use /credits",
"Announcement: New to this server? Use /help or /commands. Also Please Register on our forums (/website)",
"Announcement: Want to be a Admin? Applicate on our forums, but Please Read our rules before doing so.",
"Announcement: Feel Free to invite your friends to Party For Life! We will have great thanks to you",
"Announcement: Do you have Ideas for this server? Go to our Ideas - Bugs - Complaints section and post!"};
PAWN doesn't process stuff in commentary .. so where you are putting the website "
http://..." it will only be processed up until "http:" because afterwards you comment everything out by using "//" .. they should be escaped.
Re: Error: 032 & 052 -
M4S7ERMIND - 28.04.2010
Quote:
Originally Posted by Tɧ϶ Tσηί™
its in quotations...so not the problem.
|
Re: Error: 032 & 052 -
Toni - 28.04.2010
Quote:
Originally Posted by _❼_
Look..
pawn Код:
new Announcements [8][128] = { // Announcements[number of announcement messages][string lengh]"Announcement: Visit Our Forums! Go to http://rayze-universe.lol", "Announcement: Want to Stay with us? Add » 99.58.71.127:7777 « To your Favourites!", "Announcement: Want to be a V.I.P Member? Pay only $10 and become V.I.P for life! (/vip)", "Announcement: Want to know who is the developer of Party For Life! [P.F.R]? use /credits", "Announcement: New to this server? Use /help or /commands. Also Please Register on our forums (/website)", "Announcement: Want to be a Admin? Applicate on our forums, but Please Read our rules before doing so.", "Announcement: Feel Free to invite your friends to Party For Life! We will have great thanks to you", "Announcement: Do you have Ideas for this server? Go to our Ideas - Bugs - Complaints section and post!"};
PAWN doesn't process stuff in commentary .. so where you are putting the website " http://..." it will only be processed up until "http:" because afterwards you comment everything out by using "//" .. they should be escaped.
|
Omg, For the last time,
THERE ARE FUCKING QUOTATIONS AROUND THE STRING
|
v
"Announcement: Visit Our Forums! Go to
http://rayze-universe.lol --->
", <---
^
|
Re: Error: 032 & 052 -
iLinx - 28.04.2010
Yes but the // will induce a comment no matter if it's being evaluated as a literal string or as a piece of code.