help with sscanf -.-
#2

Okay, the problem here is simple, think about what you're doing. You're using sscanf to split up the formatted string, that isn't going to work because the information isn't stored there, use mysql_fetch_row_format() to store the information you're looking for in the "dat" array, for example:

pawn Код:
new dat[256], string[100], Float:x, Float:y, Float:z;
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "SELECT x, y, z FROM User WHERE `Name`='%s'", name);
mysql_query(string),
mysql_store_result();
mysql_fetch_row_format(dat,"|");
sscanf(dat, "p<|>fff",x, y, z);
format(string, sizeof(string), "%f,%f,%f", x, y, z);
SendClientMessage(playerid, GREY, string);
mysql_free_result();
Reply


Messages In This Thread
help with sscanf -.- - by Sascha - 18.01.2011, 15:04
Re: help with sscanf -.- - by JaTochNietDan - 18.01.2011, 15:08
Re: help with sscanf -.- - by Sascha - 18.01.2011, 15:17
Re: help with sscanf -.- - by JaTochNietDan - 18.01.2011, 15:21
Re: help with sscanf -.- - by Sascha - 18.01.2011, 15:36

Forum Jump:


Users browsing this thread: 1 Guest(s)