Sziasztok! Egy olyan problémám lenne, hogy a frakció betöltésekor nem történik semmi, logban azt írja hogy successful de nem lesz semmi.
A kód:
func LoadFractions()
{
new nums, fields;
cache_get_data(nums, fields);
if(nums > 0)
{
for(new i = 0; i < nums; i++)
{
fInfo[fVan] = bool:cache_get_field_content_int(i,\"exist\");
fInfo[fDBID] = cache_get_field_content_int(i,\"dbid\");
cache_get_field_content(i,\"name\",fInfo[fName]);
cache_get_field_content(i,\"short_name\",fInfo[fSName]);
fInfo[fMaxMembers] = cache_get_field_content_int(i,\"maxmembers\");
fInfo[fType] = cache_get_field_content_int(i,\"type\");
}
}
}
Megvan a probléma. Az R39-es verzióban, a string betöltéshez meg kell adni a connectionHandle-t illetve a maximum hosszúságot.
Mint te is látod, az inteket betöltötte, tehát a stringgel van a baj.
cache_get_field_content(row, const field_name[], destination[], connectionHandle = 1, max_len = sizeof(destination))
Ez alapján a kódod:
cache_get_field_content(i,\"name\",fInfo[i][fName],mysql_id,sizeof(fInfo[i][fName]));
cache_get_field_content(i,\"short_name\",fInfo[i][fSName],mysql_id,sizeof(fInfo[i][fName]));
Amennyiben, a sizeof(változóneve) nem müködne, használj számokat pl.
cache_get_field_content(i,\"name\",fInfo[i][fName],mysql_id,64);
cache_get_field_content(i,\"short_name\",fInfo[i][fSName],mysql_id,16);