Ty for that code
Another problem
Код:
function:Query_LoadFactionRanks(factionid)
{
new rows, fields;
cache_get_row_count(rows);
cache_get_field_count(fields);
for (new i = 0; i < rows && i< MAX_FACTION_RANKS; i++)
{
cache_get_value_name(i, "FactionRank1", FactionRanks[PlayerInfo[i][pFaction]["NotSet"]);
cache_get_value_name(i, "FactionRank2", FactionRanks[PlayerInfo[i][pFaction]["NotSet"]); // example
}
return 1;
}
And my database screenshot
https://imgur.com/a/HP2JgJO
My variable
Код:
pFactionRank,
new FactionRanks[MAX_FACTIONS][MAX_FACTION_RANKS][60];
If you guys wanna see the old code
I try to add 1 by 1 lines so i change it
Код:
function:Query_LoadFactionRanks(factionid)
{
new str[128];
new rows, fields; cache_get_data(rows, fields, ourConnection);
for (new i = 0; i < rows; i++)
{
for (new j = 1; j < MAX_FACTION_RANKS; j++)
{
format(str, sizeof(str), "FactionRank%i", j);
cache_get_field_content(i, str, FactionRanks[factionid][j], ourConnection, 60);
}
}
return 1;
}
I dont know what to do with this code can anyone explain please
Sorry for stupid question