sscanf problem...
#1

Everything is fine, except the last 3...

pawn Код:
new row[500];
    mysql_fetch_row(row);
    new Info[13], Info2[8][100];
    sscanf(row, "p<|>ds[100]s[100]ddddddds[100]dds[100]ds[100]ddd", Info[0],
    Info2[0], Info2[1], Info[1], Info[2], Info[3], Info[4], Info[5], Info[6], Info[7],
    Info2[2], Info2[3], Info2[4], Info2[5], Info[8], Info2[6], Info[9], Info[10], Info[11], Info[12]);
    SetPVarInt(playerid, "adminlvl", Info[2]);
    SetPlayerScore(playerid, Info[7]); //Works

    ResetPlayerSP(playerid);
    ResetPlayerEXP(playerid);
    GivePlayerEXP(playerid, Info[11]); //No worky
    GivePlayerSP(playerid, Info[6]); //Works

    SetPlayerScore(playerid, Info[6]); //Works
    SetPlayerSkin(playerid, Info[10]); //No worky.
    GivePlayerMoney(playerid, Info[6]); //Works
Info[10] and Info[11] Are the only ones giving problems, I already debugged in mysql, And its getting the correct INT's, but sscanf is the only thing giving troubles.. Everything else works though! except the last 3 things!
Reply
#2

bump skittle bump..
Reply
#3

don't you mean the array specifier?
Reply
#4

I was just thinking because his isn't an enum already wouldn't you want to do array?

pawn Код:
sscanf(row, "p<|>ds[100]s[100]a<d>[7]s[100]a<d>[2]s[100]ds[100]a<d>[4]", Info[0], Info2[0], Info2[1], Info[1], Info2[2], Info2[3], Info2[5], Info[8], Info2[6], Info[9]);
rearranging your mysql columns might be beneficial.
Reply
#5

Hm.. so i need to make an array? or rearrange mysql columns to the important ones?
Reply
#6

neither, it would just improve read/code-ability.
Reply
#7

Quote:
Originally Posted by Daren_Jacobson
Посмотреть сообщение
neither, it would just improve read/code-ability.
uhm.. How?..
Reply
#8

k. So i guess make an enum to store the rest of data?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)