Error 047 - Problem with arrays - 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 047 - Problem with arrays (
/showthread.php?tid=265046)
Error 047 - Problem with arrays -
Willow - 29.06.2011
It's the first time I'm having this error... unfortunately I can't solve this...
So I have this enum:
Код:
enum namess
{
RankName1[32],
RankName2[32],
RankName3[32],
RankName4[32],
RankName5[32],
RankName6[32],
Name[32]
}
new GroupName[MAX_GROUPS][namess];
and
Код:
GroupName[POLICE][RankName1] = "Cadet";
GroupName[POLICE][RankName2] = "Lieutenant";
GroupName[POLICE][RankName3] = "Captain";
GroupName[POLICE][RankName4] = "Deputy Chief";
GroupName[POLICE][RankName5] = "Assistant Chief";
GroupName[POLICE][RankName6] = "Chief";
GroupName[POLICE][Name] = "LSPD";
GroupName[MEDIC][RankName1] = "Cadet";
GroupName[MEDIC][RankName2] = "Teacher";
GroupName[MEDIC][RankName3] = "Doctor's apprentice";
GroupName[MEDIC][RankName4] = "Doctor";
GroupName[MEDIC][RankName5] = "Assistant Leader";
GroupName[MEDIC][RankName6] = "Leader";
GroupName[POLICE][Name] = "LS Medic";
GroupName[WARRIORS][RankName1] = "Outsider";
GroupName[WARRIORS][RankName2] = "Enforcer";
GroupName[WARRIORS][RankName3] = "Soldier";
GroupName[WARRIORS][RankName4] = "Capo";
GroupName[WARRIORS][RankName5] = "Underboss";
GroupName[WARRIORS][RankName6] = "Godfather";
GroupName[WARRIORS][Name] = "LS Warriors";
GroupName[KNIGHTS][RankName1] = "Outsider";
GroupName[KNIGHTS][RankName2] = "Enforcer";
GroupName[KNIGHTS][RankName3] = "Soldier";
GroupName[KNIGHTS][RankName4] = "Capo";
GroupName[KNIGHTS][RankName5] = "Underboss";
GroupName[KNIGHTS][RankName6] = "Godfather";
GroupName[KNIGHTS][Name] = "Knight Riders";
GroupName[TAXI][Name] = "Taxi & Limo Co.";
GroupName[TRUCKERS][Name] = "LS Storage Co.";
GroupName[FARMES][Name] = "Farmers Association";
GroupName[CIVILIAN][Name] = "Civilian";
I have 26 errors on the each of the line:
Код:
error 047: array sizes do not match, or destination array is too small
My array sizes is long enough.. Is there something I have missed?
Re: Error 047 - Problem with arrays -
Shadoww5 - 29.06.2011
These 26 errors can be caused because it's missing a
{ or }.
#DOUBT
How can I say this >>
{ or
} << in english ?
Re: Error 047 - Problem with arrays -
StilThere - 29.06.2011
Quote:
Originally Posted by Shadoww5
How can I say this >> { or } << in english ?
|
accolade; brace
Re: Error 047 - Problem with arrays -
Skaizo - 29.06.2011
Код:
enum namess[]
{
RankName1[32],
RankName2[32],
RankName3[32],
RankName4[32],
RankName5[32],
RankName6[32],
Name[32]
}
new GroupName[MAX_GROUPS][namess];
or
Код:
enum namess[32]
{
RankName1[32],
RankName2[32],
RankName3[32],
RankName4[32],
RankName5[32],
RankName6[32],
Name[32]
}
new GroupName[MAX_GROUPS][namess];