sscanf + MySQL problem
#3

Try this maybe

pawn Code:
public LoadFactions()
{
    new idx = 0, f = 0;
    mysql_query("SELECT * FROM `rp_factions`");
    mysql_store_result();
   
    if(mysql_num_rows())
    {
        while(mysql_fetch_row_format(query, "|"))
        {
            if (idx >= MAX_FACTIONS) break;
            print("step 1 done"); // this appears
            sscanf(query, "p<|>e<dds[50]s[250]s[40]ds[50]s[50]s[50]s[50]s[50]s[50]s[50]ddddddffffffffdd>", FactionData[idx++])
            print("step 2 done"); // this doesn't, so there's some problem above step 2 and below step 1
            f++;
        }
    }
    mysql_free_result();
    printf("- Factions: %d", f); // nor does this appear, so everything stops after the sscanf query
    return 1;
}
Reply


Messages In This Thread
sscanf + MySQL problem - by DanishHaq - 06.10.2013, 20:33
Re: sscanf + MySQL problem - by Patrick - 06.10.2013, 20:38
Re: sscanf + MySQL problem - by Emmet_ - 06.10.2013, 20:40
Re: sscanf + MySQL problem - by DanishHaq - 06.10.2013, 20:42

Forum Jump:


Users browsing this thread: 1 Guest(s)