SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/10/2017, 05:11 PM   #1
XHunterZ
Big Clucker
 
Join Date: Jul 2015
Location: Indian Kottha
Posts: 147
Reputation: 1
Default MySQL little problem

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



Code:
 		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;
			}
		}
__________________
I just know HTML and CSS, trying to learn PAWN..
XHunterZ is offline   Reply With Quote
Old 03/10/2017, 06:04 PM   #2
biker122
Gangsta
 
Join Date: Feb 2014
Posts: 766
Reputation: 59
Default Re: MySQL little problem

Posting your SQL log would help a bit..
__________________
k
biker122 is offline   Reply With Quote
Old 03/10/2017, 06:05 PM   #3
whadez
Big Clucker
 
whadez's Avatar
 
Join Date: Jun 2014
Location: Hungary
Posts: 128
Reputation: 21
Default Re: MySQL little problem

Update your SQL to 41-4 you dont live in early 2010.
__________________
Reference:
(Laravel, Vue.js, NuxtJS SSR, JWT) LS:RP - Hungary [Click Here]
(Laravel, Vue.js) RC:RP [Click Here]
(Laravel, Vue.js) LS:RP MTA [Click Here]
(Laravel) LimeGaming MTA [Click Here]
(Laravel) Blue Lake Roleplay [Click Here]

I'm willing to take webdevelopment jobs. Contact me for info.
Discord: whadez#4817
whadez is offline   Reply With Quote
Old 03/10/2017, 08:42 PM   #4
XHunterZ
Big Clucker
 
Join Date: Jul 2015
Location: Indian Kottha
Posts: 147
Reputation: 1
Default Re: MySQL little problem

Quote:
Originally Posted by whadez View Post
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
__________________
I just know HTML and CSS, trying to learn PAWN..
XHunterZ is offline   Reply With Quote
Old 03/10/2017, 08:44 PM   #5
XHunterZ
Big Clucker
 
Join Date: Jul 2015
Location: Indian Kottha
Posts: 147
Reputation: 1
Default Re: MySQL little problem

Quote:
Originally Posted by biker122 View Post
Posting your SQL log would help a bit..
no thing in the log


Code:
[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.
__________________
I just know HTML and CSS, trying to learn PAWN..
XHunterZ is offline   Reply With Quote
Old 03/10/2017, 08:45 PM   #6
Unrea1
Gangsta
 
Unrea1's Avatar
 
Join Date: Oct 2013
Location: Venezuela
Posts: 792
Reputation: 126
Default Re: MySQL little problem

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

Update your plugin, god.
__________________
Unrea1 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Hash Problem & MYSQL Saving Problem Faqahat Scripting Help 3 18/04/2016 12:54 PM
[PLUGIN]: MySQL Problem (MYSQL R39-2) zT KiNgKoNg Scripting Help 11 11/11/2014 07:20 PM
[Mysql problem] Loss of communication with the mysql base SmileyCoder General 0 29/05/2014 04:38 PM
saving system mysql(not mysql problem) martoivanov Scripting Help 0 29/08/2013 04:37 PM
Problem with reading money from MySQL in "Clean, Simple MySQL GM" by L3th4l Dystans Help Archive 1 31/05/2011 10:19 PM


All times are GMT. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.