SA-MP Forums Archive
Array index out of bounds. - 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: Array index out of bounds. (/showthread.php?tid=633384)



Array index out of bounds. - danielpalade - 30.04.2017

-- DELETED --


Re: Array index out of bounds. - SoLetsGO - 30.04.2017

Can you show the definition of "fb" ?


Re: Array index out of bounds. - danielpalade - 30.04.2017

Quote:
Originally Posted by SoLetsGO
View Post
Can you show the definition of "fb" ?
It's my enum

Code:
enum fb_matches
{
	matchID,
	matchTeam[3],
	matchStatus,
	matchScore[2],
	matchTime,
	matchStart,
	matchGoals[2],
	Float: matchOdds[3]
}
new fb[MAX_MATCHES+1][fb_matches];



Re: Array index out of bounds. - iLearner - 30.04.2017

What do you pass as parameter team.


Re: Array index out of bounds. - danielpalade - 30.04.2017

Quote:
Originally Posted by iLearner
View Post
What do you pass as parameter team.
The ID from an array.
Depends wich Team, if team[0] then array =>

Code:
new fb_team1[][] = 
{
	
	"Arsenal",
	"Aston Villa",
	"Barnsley",
	"Birmingham City",
	"Blackburn Rovers",
	"Blackpool",
	"Bolton Wanderers",
	"Bournemouth",
	"Bardford City",
	"Burnley",
	"Cardiff City",
	"Charlton Athletic",
	"Chelsea",
	"Coventry City",
	"Crystal Palace",
	"Derby County",
	"Everton",
	"Fulham",
	"Hull City",
	"Ipswich Town",
	"Leeds United",
	"Leicester City",
	"Liverpool",
	"Machester City"

};
else for match[1]

Code:
new fb_team2[][] = 
{
	
	"Oldham Athletic",
	"Portsmouth",
	"Queens Park Rangers",
	"Reading",
	"Sheffield United",
	"Sheffield Wednesday",
	"Southampton",
	"Stoke City",
	"Sunderland",
	"Swansea City",
	"Swindon Town",
	"Tottenham Hotspur",
	"Watford",
	"West Bromwich Albion",
	"West Ham United",
	"Wigan Athletic",
	"Wimbledon",
	"Wolverhampton Wanderers",
	"Middlesbrough",
	"Newcastle United",
	"Norwich City",
	"Nottingham Forest",
	"Manchester United"
	
};