Sscanf query failing with skin.
#1

Hi, I am having trouble with fetching the skin for a player, it should be retrieving the skin from "skin" but instead, it retrieves it from "score" which is quite odd.

pawn Код:
new query[500];
    format(query, sizeof(query),"SELECT * FROM `playerdb` WHERE `username` = '%s'",playerdb[playerid][username]);
    mysql_query(query);
    mysql_store_result();
    while(mysql_fetch_row(query,"|"))
    {
        sscanf(query, "p<|>e<s[25]s[35]iiiii>", playerdb[playerid]);
        SetPlayerSkin(playerid, playerdb[playerid][skin]);
    }
    mysql_free_result();
    return 1;
}
also, my enums are
Код:
username[MAX_PLAYER_NAME],
password[32],
score,
money,
power,
deaths,
skin,
Thanks for the help!
Reply


Messages In This Thread
Sscanf query failing with skin. - by FalconWingsX - 23.12.2012, 23:37
Re: Sscanf query failing with skin. - by [HiC]TheKiller - 24.12.2012, 00:00
Re: Sscanf query failing with skin. - by FalconWingsX - 24.12.2012, 00:17

Forum Jump:


Users browsing this thread: 1 Guest(s)