16.01.2012, 19:17
I have a problem with my Faction loading system.
I have this code:
The problem is, is that it posts this on the console:
It loads each Faction 4 times, because there are 4 factions; it's confusing. All help is appreciated and rep will be distributed.
I have this code:
pawn Код:
case D_THREAD_LOADFACTIONS:
{
mysql_store_result();
if(mysql_num_rows() > 0)
{
new szResult[300];
while(mysql_fetch_row_format(szResult, "|"))
{
for(new row = 0; row < mysql_affected_rows(); row++)
{
sscanf(szResult, "e<p<|>ds[50]s[30]s[30]s[30]s[30]s[30]s[30]s[30]>", Factions[row]);
print(szResult);
iTotalFactions++;
}
}
}
}
The problem is, is that it posts this on the console:
Код:
[13:55:24] 1|Angel Pine Sheriffs Department|Test|Test|None|None|None|None|Sheriff [13:55:24] 1|Angel Pine Sheriffs Department|Test|Test|None|None|None|None|Sheriff [13:55:24] 1|Angel Pine Sheriffs Department|Test|Test|None|None|None|None|Sheriff [13:55:24] 1|Angel Pine Sheriffs Department|Test|Test|None|None|None|None|Sheriff [13:55:24] 2|Angel Pine Medical & Fire Services|None|None|None|None|None|None|Chief of EMS. [13:55:24] 2|Angel Pine Medical & Fire Services|None|None|None|None|None|None|Chief of EMS. [13:55:24] 2|Angel Pine Medical & Fire Services|None|None|None|None|None|None|Chief of EMS. [13:55:24] 2|Angel Pine Medical & Fire Services|None|None|None|None|None|None|Chief of EMS. [13:55:24] 3|Bug Extermination Co.|None|None|None|None|None|None|Director [13:55:24] 3|Bug Extermination Co.|None|None|None|None|None|None|Director [13:55:24] 3|Bug Extermination Co.|None|None|None|None|None|None|Director [13:55:24] 3|Bug Extermination Co.|None|None|None|None|None|None|Director [13:55:24] 4|Grand Dragon Triad|None|None|None|None|None|None|None [13:55:24] 4|Grand Dragon Triad|None|None|None|None|None|None|None [13:55:24] 4|Grand Dragon Triad|None|None|None|None|None|None|None [13:55:24] 4|Grand Dragon Triad|None|None|None|None|None|None|None