13.02.2013, 18:49
hai. i've go this code:
and forumID is 1, but sscanf do it to 101. What's wrong?
Код:
format(sqlquery, 512, "SELECT p.gid, p.forumID, p.adminLvl, p.skin, p.money, p.bMoney, p.lastPosX, p.lastPosY, p.lastPosZ, p.lastPosAngle, my.username FROM players p LEFT JOIN mybb_users my ON (p.forumID = my.uid) WHERE `login`='%s'", pName_(pid)); mysql_query(sqlquery); mysql_store_result(); while(mysql_fetch_row_format(sqlstring, "|")) { sscanf(sqlstring, "p<|>iiiiiiffffs[24]", playerInfo[pid][gid], playerInfo[pid][forumID], playerInfo[pid][adminLvl], playerInfo[pid][skin], playerInfo[pid][money], playerInfo[pid][bMoney], playerInfo[pid][lastPos][0], playerInfo[pid][lastPos][1], playerInfo[pid][lastPos][2], playerInfo[pid][lastPos][3], playerInfo[pid][forumName]); } mysql_free_result();