Quote:
Originally Posted by Emmet_
Maybe you can try this:
pawn Код:
stock LoadFactionInfo(iFaction) { new Query[700]; format(Query, sizeof(Query), "SELECT * FROM `factioninfo` WHERE `factionid` = '%d'", iFaction); mysql_query(Query); mysql_store_result(); if (mysql_num_rows()) { mysql_fetch_row_format(Query, "|"); sscanf(Query, "e<p<|><ds[32]ds[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]s[32]d>", FVar[iFaction]); } mysql_free_result(); return 1; }
stock loadfactions() { for(new i = 0; i != MAX_FACTIONS; i++) { LoadFactionInfo(i); } print("Factions loaded"); return 1; }
You stored a result one time and free'd a result like 10 times.
|
Thanks, that's much more efficient but, I'm afraid it's still not returning the string.. I'm continuing to work on it but having the same result.