26.04.2011, 21:25
How am i able to load a float from MySQL ?
This is my current code, all works fine except from the floats.
Thanks for the help..
This is my current code, all works fine except from the floats.
pawn Код:
new data[2][50]; //The data strings
new data2[9]; //The data variables
sscanf(line, "p|ssddddddfff", data[0], data[1], data2[0], data2[1], data2[2], data2[3], data2[4], data2[5], data2[6], data2[7], data2[8]); //Splits the line with sscanf
PInfo[playerid][Money] = data2[0];
PInfo[playerid][AdminLevel] = data2[1];
PInfo[playerid][Kills] = data2[2];
PInfo[playerid][Deaths] = data2[3];
PInfo[playerid][HoursPlayed] = data2[4];
PInfo[playerid][Interior] = data2[5];
PInfo[playerid][PosX] = data2[6];
PInfo[playerid][PosY] = data2[7];
PInfo[playerid][PosZ] = data2[8];
mysql_free_result();