Airlines wont load correctly
#1

Hi, i've got a airline loading system which is completely the same as my other loading systems;
pawn Код:
enum aInfo
{
    aID,
    Float:aX,
    Float:aY,
    Float:aZ,
    aSkin,
    aRank1[50],
    aRank2[50],
    aRank3[50],
    aRank4[50],
    aRank5[50],
    aName[100],
    aFunds,
    aMOTD[128],
}
new AirlineInfo[MAX_AIRLINES][aInfo];
new airlines;

stock LoadAirlines()
{
    mysql_query("SELECT * FROM `airlines`");
    mysql_store_result();
    new line[550];
    while(mysql_fetch_row_format(line)) {
        sscanf(line, "e<p<|>dfffds[50]s[50]s[50]s[50]s[50]s[100]ds[128]>", AirlineInfo[airlines]);
        ++airlines;
        print(line);
    }
    printf("Loaded Airlines: %d.", airlines);
    mysql_free_result();
    return 1;
}
I honestly have no idea. It's loading correctly, it's just not assigning the vars, as you can see i've set a little debug print, here it is;
Код:
[01:08:20] Airlines ID: 0
[01:08:20] 1|9.9|0|0|120|rank1|rank2|rank3|rank4|rank5|nametest|0|Default
[01:08:20] Airlines ID: 0
[01:08:20] 2|0|0|0|113|Test1|Test2|rank3|test4|rank5|Luis_Test|0|
[01:08:20] Loaded Airlines: 2.
Reply
#2

bump.
Reply
#3

Do you have the latest sscanf?

which you need to #include <sscanf2>
Reply
#4

Yes. I already have it.
Reply
#5

don't use enums..try using it without enum.. also try without sscanf (mysql_get_field) (the speed is not a factor) Please don't rep me if this helped btw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)