MySQL little problem
#1

so iam trieng to create another town but when i asked how someone gave me this code but it always returns the value as 0, even it is 1 in the database, so what is the problem? im using StrickenKid's MySQL Plugin - v2.1.1



Код:
 		new townQuery[200];
		new townspawn;
		format(townQuery, sizeof(townQuery), "SELECT `town` FROM `playerdata` WHERE `playerName` = '%s'", playerNamee);
		mysql_query(townQuery), mysql_store_result();
		if(mysql_num_rows() != 0)
		{
			mysql_fetch_row(townQuery);
			sscanf(townQuery, "i", townspawn);
			mysql_free_result();
		}
		switch(townspawn)
		{
			case -1:
			{
				ShowPlayerDialog(playerid, DIALOG_TOWN, DIALOG_STYLE_LIST, "Choose Spawn Town", "San Fierro \nLas Venturas", "Choose", "");
				TogglePlayerSpectating(playerid, true);
			}
			case 0:
			{
			    playerData[playerid][playerTown] = SF;
			}
			case 1:
			{
	 			playerData[playerid][playerTown] = LV;
			}
		}
Reply
#2

Posting your SQL log would help a bit..
Reply
#3

Update your SQL to 41-4 you dont live in early 2010.
Reply
#4

Quote:
Originally Posted by whadez
Посмотреть сообщение
Update your SQL to 41-4 you dont live in early 2010.
what is 41-4? and if i update the include, i have to change all MySQL functions in the GM? its a huge GM but im still learning and asking for help
Reply
#5

Quote:
Originally Posted by biker122
Посмотреть сообщение
Posting your SQL log would help a bit..
no thing in the log


Код:
[Sun Oct  1 17:00:46 2017] -------------------------
[Sun Oct  1 17:00:46 2017]      Logging Started
[Sun Oct  1 17:00:46 2017] -------------------------
[Sun Oct  1 17:00:47 2017] Connected (0) to server_989 @ 127.0.0.1 via TCP/IP.
[Sun Oct  1 17:00:47 2017] MySQL Server Version 5.5.50-0+deb8u1.
Reply
#6

If you want better compatibility use SA-MP 0.3a or 0.2x.

Update your plugin, god.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)