Why i get this error
#1

Hey guys i try to make my faction sistem dynamic but i have a problem when i open the server

Pic's with my `factions` Structure: https://postimg.org/image/w75arx04x/

Error from mysql_log:
Код HTML:
[23:33:13 05/31/17] [ERROR] CMySQLResult::GetRowDataByName() - invalid row index ('1') (Query: "SELECT * FROM `factions`")
Dynamicfactions:
Код HTML:
new factionss = 0;
enum Factions
{
	fID,
	fName[128],
	Float:fcX,
	Float:fcY,
	Float:fcZ,
	Float:fceX,
	Float:fceY,
	Float:fceZ,
	Float:fSafePos[3],
	fSafePickupID,
	Text3D:fSafeLabelID,
	fMats,
	fDrugs,
	fBank,
	fAnn[128],
	fWin,
	fLost,
	fMembers,
	fMaxMembers,
	fMinLevel,
	fApplication,
	fInterior,
	fVirtual,
	fMapIcon,
	fLocked,
	fPickupID,
	fPickupIDD,
	Text3D:fLabelID,
	fRankName1[64],
	fRankName2[64],
	fRankName3[64],
	fRankName4[64],
	fRankName5[64],
	fRankName6[64],
	fRankName7[64]
};
new DynamicFactions[100][Factions];
Load the `factions`:
Код HTML:
gQuery[0] = (EOS);
    mysql_format(handle, gQuery, sizeof(gQuery), "SELECT * FROM `factions`");
	mysql_tquery(handle, gQuery, "LoadDynamicFactions", "");
And the function:
Код HTML:
function LoadDynamicFactions()
{
	factionss = cache_num_rows();
	new id, string[30];
    for(new i = 0; i <= factionss; i++)
    {
		//new f = i - 1;
		cache_get_field_content(i, "ID", string);				DynamicFactions[id][fID] = strval(string);
		cache_get_field_content(i, "Name", string);				strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "X", string);				DynamicFactions[id][fcX] = strval(string);
		cache_get_field_content(i, "Y", string);				DynamicFactions[id][fcY] = strval(string);
		cache_get_field_content(i, "Z", string);				DynamicFactions[id][fcZ] = strval(string);
		cache_get_field_content(i, "eX", string);				DynamicFactions[id][fceX] = strval(string);
		cache_get_field_content(i, "eX", string);				DynamicFactions[id][fceY] = strval(string);
		cache_get_field_content(i, "eX", string);				DynamicFactions[id][fceZ] = strval(string);
		cache_get_field_content(i, "SafePos1", string);			DynamicFactions[id][fSafePos][0] = strval(string);
		cache_get_field_content(i, "SafePos2", string);			DynamicFactions[id][fSafePos][1] = strval(string);
		cache_get_field_content(i, "SafePos3", string);			DynamicFactions[id][fSafePos][2] = strval(string);
		cache_get_field_content(i, "Mats", string);				DynamicFactions[id][fMats] = strval(string);
		cache_get_field_content(i, "Interior", string);			DynamicFactions[id][fInterior] = strval(string);
		cache_get_field_content(i, "Virtual", string);			DynamicFactions[id][fVirtual] = strval(string);
		cache_get_field_content(i, "MapIcon", string);			DynamicFactions[id][fMapIcon] = strval(string);
		cache_get_field_content(i, "Locked", string);			DynamicFactions[id][fLocked] = strval(string);
		cache_get_field_content(i, "Drugs", string);			DynamicFactions[id][fDrugs] = strval(string);
		cache_get_field_content(i, "Bank", string);				DynamicFactions[id][fBank] = strval(string);
		cache_get_field_content(i, "PickupID", string);			DynamicFactions[id][fPickupID] = strval(string);
		cache_get_field_content(i, "Anunt", string);			DynamicFactions[id][fAnn] = strval(string);
		cache_get_field_content(i, "Win", string);				DynamicFactions[id][fWin] = strval(string);
		cache_get_field_content(i, "Lost", string);				DynamicFactions[id][fLost] = strval(string);
		cache_get_field_content(i, "MaxMembers", string);		DynamicFactions[id][fMaxMembers] = strval(string);
		cache_get_field_content(i, "MinLevel", string);			DynamicFactions[id][fMinLevel] = strval(string);
		cache_get_field_content(i, "Application", string);		DynamicFactions[id][fApplication] = strval(string);
		cache_get_field_content(i, "Rank1", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "Rank2", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "Rank3", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "Rank4", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "Rank5", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "Rank6", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
		cache_get_field_content(i, "Rank7", string);			strmid(DynamicFactions[id][fName], string, false, strlen(string), 32);
	return 1;
}
Any idea why? i get that error ?
Reply


Messages In This Thread
Why i get this error - by StR_MaRy - 31.05.2017, 20:51
Re: Why i get this error - by NewFreeroamStunt - 31.05.2017, 22:47
Re: Why i get this error - by Jefff - 31.05.2017, 22:52
Re: Why i get this error - by StR_MaRy - 31.05.2017, 23:53
Re: Why i get this error - by Jefff - 01.06.2017, 02:00
Re: Why i get this error - by StR_MaRy - 01.06.2017, 02:08
Re: Why i get this error - by Vince - 01.06.2017, 05:42
Re: Why i get this error - by StR_MaRy - 01.06.2017, 11:29
Re: Why i get this error - by JasonRiggs - 01.06.2017, 11:38
Re: Why i get this error - by StR_MaRy - 01.06.2017, 11:47

Forum Jump:


Users browsing this thread: 1 Guest(s)