[Help] I get This error , the same one, 8 times
#1

Hi,
I was able to fix 20 of them , but am stuck with theis
Код:
 
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(30652) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38382) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38459) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38460) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38461) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38462) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38463) : error 047: array sizes do not match, or destination array is too small
D:\DOCUME~1\user\MYDOCU~1\SCRIPT~1\penlsO\GAMEMO~1\penlsO.pwn(38464) : error 047: array sizes do not match, or destination array is too small
here are the lines
first line :
Код:
30652:                      else if(PlayerInfo[playerid][pMember] >= 7) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = FamilyInfo[PlayerInfo[playerid][pMember]][FamilyName]; PlayerInfo[para1][pModel] = FamilyInfo[PlayerInfo[playerid][pMember]][FamilySkin1]; }
second line:
Код:
38382:                { ftext = FamilyInfo[fam][FamilyName]; }
3ed/4th/5th/6th/7th/8th line :
Код:
38457:       else if(PlayerInfo[targetid][pMember] >= 7) // Open Faction Ranks
38458:	{
38459:               if(PlayerInfo[targetid][pRank] == 1) { rtext = FamilyInfo[fam][FamilyRank1]; }
38460:		else if(PlayerInfo[targetid][pRank] == 2) { rtext = FamilyInfo[fam][FamilyRank2]; }
38461:		else if(PlayerInfo[targetid][pRank] == 3) { rtext = FamilyInfo[fam][FamilyRank3]; }
38462:		else if(PlayerInfo[targetid][pRank] == 4) { rtext = FamilyInfo[fam][FamilyRank4]; }
38463:		else if(PlayerInfo[targetid][pRank] == 5) { rtext = FamilyInfo[fam][FamilyRank5]; }
38464:	        else if(PlayerInfo[targetid][pRank] == 6) { rtext = FamilyInfo[fam][FamilyRank6]; }
38465:		else { rtext = "Outsider"; }
38466:        }
Could anyone help me with this ?
Thanks
Reply
#2

Make sure that rtext is the same size or bigger than the FamilyRank arrays.

If you don't know what I mean, please show where you create both the FamilyRank and rtext variables.
Reply
#3

wehn i've see " If you don't know what I mean " I tought the rest was, get the hell away from scripting xD

Код:
38368:   new ftext[128];
	    if(PlayerInfo[targetid][pMember] == 1)
		{ ftext = "Los Santos Police Department"; }
        else if(PlayerInfo[targetid][pMember] == 2)
		{ ftext = "FBI Agency"; }
        else if(PlayerInfo[targetid][pMember] == 3)
		{ ftext = "Goverment"; }
		else if(PlayerInfo[targetid][pMember] == 4)
		{ ftext = "Los Santos Emergency Rescue"; }
		else if(PlayerInfo[targetid][pMember] == 5)
		{ ftext = "San News"; }
		else if(PlayerInfo[targetid][pMember] == 6)
		{ ftext = "Target FM Radio 98.6"; }
  		else if(PlayerInfo[targetid][pMember] >= 7)
		{ ftext = FamilyInfo[fam][FamilyName]; }
		else
		{ ftext = "None"; }
		
	    new rtext[512];
	    if(PlayerInfo[targetid][pMember] == 1)
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Cadet"; }
		    else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Police Officer"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Senior Officer"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Lead Officer"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Corporal"; }
			else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Sergeant"; }
	        else if(PlayerInfo[targetid][pRank] == 7) { rtext = "Staff Sergeant"; }
	        else if(PlayerInfo[targetid][pRank] == 8) { rtext = "Lieutenant"; }
	        else if(PlayerInfo[targetid][pRank] == 9) { rtext = "Captain"; }
	        else if(PlayerInfo[targetid][pRank] == 10) { rtext = "Commander"; }
			else if(PlayerInfo[targetid][pRank] == 11) { rtext = "Deputy Chief"; }
			else if(PlayerInfo[targetid][pRank] == 12) { rtext = "Police Chief"; }
	        else if(PlayerInfo[targetid][pRank] == 13) { rtext = "Police Chief"; }
	        else if(PlayerInfo[targetid][pRank] == 14) { rtext = "Police Chief"; }
	        else if(PlayerInfo[targetid][pRank] == 15) { rtext = "Police Chief"; }
            else if(PlayerInfo[targetid][pRank] == 16) { rtext = "Police Chief"; }
			else { rtext = "Cadet"; }
		}
		else if(PlayerInfo[targetid][pMember] == 2)//FBI Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Professional Staff"; }
38410:		else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Special Agent Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Special Agent"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Special Agent in Charge"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant Director in Charge"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Director"; }
			else { rtext = "Intern"; }
		}
		else if(PlayerInfo[targetid][pMember] == 3)//Goverment
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Guard"; }
		    else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Body Guard"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Driver"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Secretary"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Assistant"; }
			else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Mayor"; }
			else { rtext = "Guard"; }
		}
		else if(PlayerInfo[targetid][pMember] == 4)//Los Santos Paramedic Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Paramedic"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Supervisor"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Captain"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Deputy Chief of EMS"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Chief of EMS"; }
			else { rtext = "Trainee"; }
		}
		else if(PlayerInfo[targetid][pMember] == 5)//San News Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "Intern"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Local Reporter"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Local Editor"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Network Anchor"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Network Editor"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Network Producer"; }
			else { rtext = "Intern"; }
		}
		else if(PlayerInfo[targetid][pMember] == 6)//TFMR Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = "TFMR Trainee"; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Gangsta"; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Hoodlum"; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = "MC"; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = "DJ"; }
		    else if(PlayerInfo[targetid][pRank] == 6) { rtext = "TFMR CEO"; }
			else { rtext = "TFMR Trainee"; }
		}
		else if(PlayerInfo[targetid][pMember] >= 7) // Open Faction Ranks
		{
		    if(PlayerInfo[targetid][pRank] == 1) { rtext = FamilyInfo[fam][FamilyRank1]; }
			else if(PlayerInfo[targetid][pRank] == 2) { rtext = FamilyInfo[fam][FamilyRank2]; }
			else if(PlayerInfo[targetid][pRank] == 3) { rtext = FamilyInfo[fam][FamilyRank3]; }
			else if(PlayerInfo[targetid][pRank] == 4) { rtext = FamilyInfo[fam][FamilyRank4]; }
			else if(PlayerInfo[targetid][pRank] == 5) { rtext = FamilyInfo[fam][FamilyRank5]; }
  			else if(PlayerInfo[targetid][pRank] == 6) { rtext = FamilyInfo[fam][FamilyRank6]; }
			else { rtext = "Outsider"; }
		}
		else
		{
		    rtext = "None";
38470:		}
Reply
#4

Can you show me the enum stuff for FamilyInfo[fam][FamilyRank1]?

Then I'll be able to see what's wrong
Reply
#5

I uploaded all the script
part 1: http://de.pastebin.ca/1915241
Part 2: http://en.pastebin.ca/1915245
Part 3: http://en.pastebin.ca/1915247
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)