mysql problem save hp
#1

Hello guys i trying save health in mysql but i have problem if i try this i failed i trying saving with classic update.


Код:
new Float:hp;
GetPlayerHealth(playerid, hp);

format(query,sizeof(query),"UPDATE `data` SET `Health` = '%d' WHERE  `name` =  '%s';",hp,name(playerid));
mysql_query(handle,query);
Reply
#2

Well, you get your health as a float, so save it as a Float.
Change %d to %f

Rep+ if you think I helped and feel free to ask me anything else!
Reply
#3

thank you you help me
Reply
#4

No problem mate, feel free to PM me about anything and I'll help you as best as I can!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)