Text string (urgent :<)
#1

Hello

I'm trying to retrieve a textstring from my MySQL database. Haven't really found a good way to do this, (well it always fucks up). This is it:
Код:
		new tdata[255], Float:tx, Float:ty, Float:tz, desc;
		format(query, sizeof(query), "SELECT * FROM `teleports` WHERE `para` = '%s';", tmp);
		mysql_query(query); mysql_store_result();
		
		mysql_fetch_field("x", tdata); tx = floatstr(tdata);
		mysql_fetch_field("y", tdata); ty = floatstr(tdata);
		mysql_fetch_field("z", tdata); tz = floatstr(tdata);
		mysql_fetch_field("desc", tdata); strmid(desc, tdata, 0, strlen(tdata), 255);
This only returns me the error:
Код:
D:\Prosjekter\HD-RP\gamemodes\hd-rp.pwn(400) : error 035: argument type mismatch (argument 1)
Does anyone know how to retrieve it? It's a varchar.

Would really appreciate answers, really!
Reply


Messages In This Thread
Text string (urgent :<) - by hanzen - 13.12.2010, 18:57
Re: Text string (urgent :<) - by Ash. - 13.12.2010, 18:58
Re: Text string (urgent :<) - by hanzen - 13.12.2010, 19:08
Re: Text string (urgent :<) - by hanzen - 13.12.2010, 19:23
Re: Text string (urgent :<) - by Benjo - 13.12.2010, 19:24
Re: Text string (urgent :<) - by hanzen - 13.12.2010, 21:23

Forum Jump:


Users browsing this thread: 1 Guest(s)