Another Error
#1

Sorry for the double post but im getting another error. My previous one was to put a default value and i understood that but this one is not in my range.

Код:
[01:33:14] [connection] 127.0.0.1:56094 requests connection cookie.
[01:33:15] [connection] incoming connection: 127.0.0.1:56094 id: 0
[01:33:16] [join] Mike_Tamer has joined the server (0:127.0.0.1)
[01:34:15] Mike Tamer has logged in.
[01:34:49] [part] Mike_Tamer has left the server (0:1)
[01:34:50] [MySQL] Query Error - (ErrorID: 1292) (Handle: 1)
[01:34:50] [MySQL] Check mysql_log.txt to review the query that threw the error.
[01:34:50] Dumping query from 2016/9/11 (1:34:50)

Description: Incorrect date value: '9-04-1995' for column 'BirthDate' at row 1 (index 0). Query:
Database :
Reply
#2

The format is "year-month-day".
Reply
#3

I do it while registration but it doesn't accept.

Код:
}
	if(RegistrationStep[playerid] != 0 || strcmp(PlayerInfo[playerid][pBirthDate], "0000-00-00", true) == 0)
	{
	    if(dialogid == DIALOG_BIRTH)
	    {
	        if(response)
	        {
                new day, month, year;
				if(sscanf(inputtext, "p</>ddd", day, month, year))
				{
				    return ShowPlayerDialog(playerid, DIALOG_BIRTH, DIALOG_STYLE_INPUT, "Date of Birth", "Please enter your date of birth.\nUse the Day / Month / Year format.\n{FFFFFF}The date you entered is not possible.", "Set Date", "Close");
				}

				if(day >= 1 && day <= 31 && month >= 1 && month <= 12 && year >= 1900 && year <= 2015)
				{
					new str[64];
					format(str, sizeof(str), "You set your date of birth to %d - %d - %d.", day, month, year);
					SendClientMessage(playerid, -1, str);
					format(PlayerInfo[playerid][pBirthDate], 11, "%d-%02d-%02d", day, month, year);

					playerRegisterStage[playerid] = 0;

					SetPlayerVirtualWorld(playerid, 0);
					SetPlayerInterior(playerid, 0);
Reply
#4

You are still not using the correct format:
Код:
format(PlayerInfo[playerid][pBirthDate], 11, "%d-%02d-%02d", year, month, day);
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You are still not using the correct format:
Код:
format(PlayerInfo[playerid][pBirthDate], 11, "%d-%02d-%02d", year, month, day);
Do i have to make this true ?
Код:
if(RegistrationStep[playerid] != 0 || strcmp(PlayerInfo[playerid][pBirthDate], "0000-00-00", true) == 0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)