Command problem
#1

Hello, I would like to ask for help, because I created a command, dialogue, table in the database and added a phrase Language to PlayerData, it is worth noting that the search does not concern me in the database, why?

Код:
CMD:language(playerid, params[])
{
	Dialog_Show(playerid, Language, DIALOG_STYLE_LIST, "Select language", "English\nPolish", "Select", "Cancel");
	return 1;
}
This is my command

Код:
Dialog:Language(playerid, response, listitem, inputtext[])
{
	if (response)
	{
	    new
			message[256+1],
			query[2048];
	    if(listitem == 0)
	    {
			format(message, 256, "You have changed the server language to English!", listitem);
			SendClientMessage(playerid, 0xFFFFFFFF, message);
			PlayerData[playerid][pLanguage] = 0;
			format(query, sizeof(query), "UPDATE `account` SET `Language` = '%d'",
			PlayerData[playerid][pLanguage]
			);
			return 1;
		}
		if(listitem == 1)
		{
			format(message, 256, "Zmieniłeś język serwera na polski!", listitem);
		  	SendClientMessage(playerid, 0xFFFFFFFF, message);
			PlayerData[playerid][pLanguage] = 1;
			format(query, sizeof(query), "UPDATE `account` SET `Language` = '%d'",
			PlayerData[playerid][pLanguage]
			);
		  	return 1;
		}
	}
	return 1;
}
And this is my dialog. Please help me
Reply
#2

Please help me guys
Reply
#3

I'm not sure I understood your question. Do you mean the value on the database isn't updating? If that's what you mean, then I'm seeing you formatting your query but not actually sending it.

Also, using a length of 2048 cells for such a short query is pointless, when your query is probably less than 50 characters long.
Reply
#4

Quote:
Originally Posted by BlueBaron
Посмотреть сообщение
I'm not sure I understood your question. Do you mean the value on the database isn't updating? If that's what you mean, then I'm seeing you formatting your query but not actually sending it.

Also, using a length of 2048 cells for such a short query is pointless, when your query is probably less than 50 characters long.
The point is that the value does not update in the database
Reply
#5

Quote:
Originally Posted by Mickey227
Посмотреть сообщение
The point is that the value does not update in the database
Then my original reply still stands:

Quote:
Originally Posted by BlueBaron
Посмотреть сообщение
Do you mean the value on the database isn't updating? If that's what you mean, then I'm seeing you formatting your query but not actually sending it.
You'll have to use mysql_query or mysql_tquery, depending on which MySQL plugin you use.
Reply
#6

Quote:
Originally Posted by BlueBaron
Посмотреть сообщение
Then my original reply still stands:



You'll have to use mysql_query or mysql_tquery, depending on which MySQL plugin you use.
I am using the MySQL R39-3 plugin, would you be able to do it because I am green, let me know for the future.
Reply
#7

Quote:
Originally Posted by BlueBaron
Посмотреть сообщение
Then my original reply still stands:



You'll have to use mysql_query or mysql_tquery, depending on which MySQL plugin you use.
Please help me man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)