SA-MP Forums Archive
MySQL Get Floating - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Get Floating (/showthread.php?tid=618880)



MySQL Get Floating - sampkinq - 10.10.2016

Hello, I enrolled in the position of the player. How do I withdraw this directly. Sorry for my bad English.

Print;

Код:
			format(bla, sizeof(bla),"%f,%f,%f,%f,%f,%f", x, y, z, rx, ry, rz);
   			mysql_format(g_SQL, query, sizeof(query), "UPDATE `evler` SET `EsyaSlot%dPos` = '%s' WHERE `id` = '%d' LIMIT 1", esid+1, bla, xx1);
			mysql_tquery(g_SQL, query);
Pull ( Problem here )

Код:
	 		cache_get_value_name(yukle, "EsyaSlot1Pos", EvIslem[id][evEsyaDirekPos][0], 70);
	 		
	 		new Float:Pos[6];
	 		sscanf(EvIslem[id][evEsyaDirekPos][0], "ffffff", Pos[0], Pos[1], Pos[2], Pos[3], Pos[4], Pos[5]);
	 		printf("%f,%f,%f,%f,%f,%f", Pos[0], Pos[1], Pos[2], Pos[3], Pos[4], Pos[5]);



Re: MySQL Get Floating - iLearner - 10.10.2016

I didn't really understand your problem... But integers don't need ` ` signs, lime you did `%d`


Re: MySQL Get Floating - Sanady - 10.10.2016

PHP код:
cache_get_value_name 
This change to:
PHP код:
cache_get_row_float 
You are loading float, so ok, it`s not problem, but then why the heck are you using function for loading string from mySQL?