[MySQL] Problem with numbers
#1

Hi guys, I've got a little problem with saving numbers into MySQL...
I have simple script for players profile... I have dialog with options and one of them is Set Age...
Код:
Dialog_SetAge(playerid, response, inputtext[])
{
	// Just close the dialog if the player clicked "Cancel"
	if(!response) return 1;

	// Setup player variables
	format(PVar[playerid][pAge],3,"%d",inputtext);
//    SavePInfo(playerid);
	return 1;
}
Problem is somewhere in this dialog because a strange numbers going from there. I put in the dialog for example number 15 and it saves it as 53 for example. Do you know where is the problem ? O

Sorry for my English
Reply
#2

change "inputtext" to "strval(inputtext)"
Reply
#3

I did so and still the same problem
Reply
#4

Ah Solved

Just change

format(PVar[playerid][pAge],3,"%d",strval(inputtext));

to

PVar[playerid][pAge] = strval(inputtext);


Thank you Sascha
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)