error 032: array index out of bounds (variable "gInfo")
#1

This is my loadgroups

Код:
stock LoadGroups()
{
	new tmp[512], query[512], groups;
	mysql_format(mysql, query, sizeof(query), "SELECT * FROM `groups` ORDER BY `id`");
	mysql_tquery(mysql, query);
 	gInfo[MAX_FACTIONS][gID] = cache_get_field_content_int(0, "ID");
	gInfo[MAX_FACTIONS][gName] = cache_get_field_content_int(0, "groupName"); 
	gInfo[MAX_FACTIONS][gType] = cache_get_field_content_int(0, "groupType");
	cache_get_field_content(0, "groupRank1", tmp, mysql), pInfo[MAX_FACTIONS][gRank1] = strval(tmp);
	cache_get_field_content(0, "groupRank2", tmp, mysql), pInfo[MAX_FACTIONS][gRank2] = strval(tmp);
	cache_get_field_content(0, "groupRank3", tmp, mysql), pInfo[MAX_FACTIONS][gRank3] = strval(tmp);
	cache_get_field_content(0, "groupRank4", tmp, mysql), pInfo[MAX_FACTIONS][gRank4] = strval(tmp);
	cache_get_field_content(0, "groupRank5", tmp, mysql), pInfo[MAX_FACTIONS][gRank5] = strval(tmp);
	cache_get_field_content(0, "groupRank6", tmp, mysql), pInfo[MAX_FACTIONS][gRank6] = strval(tmp);
	cache_get_field_content(0, "groupRank7", tmp, mysql), pInfo[MAX_FACTIONS][gRank7] = strval(tmp);
	gInfo[MAX_FACTIONS][gSlots] = cache_get_field_content_int(0, "groupSlots");
	groups ++;
	printf("%d groups loaded.", groups);
	return 1;
}
This is my enum

Код:
enum groupData
{
	gID,
	gName[256],
	gType[10],
	gRank1[256],
	gRank2[256],
	gRank3[256],
	gRank4[256],
	gRank5[256],
	gRank6[256],
	gRank7[256],
	gSlots[10]
}
new gInfo[MAX_FACTIONS][groupData];
This is my variable

Код:
#define MAX_FACTIONS 14
How can I fix that error?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)