Can't Return Float Value? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can't Return Float Value? (
/showthread.php?tid=73158)
Can't Return Float Value? -
1337pr0 - 13.04.2009
pawn Код:
Getsomething(somethingid)
{
new query[128];
format(query, sizeof(query), "SELECT `something` FROM `something ` WHERE `something` = something LIMIT 1", something + something);
samp_mysql_query(query);
samp_mysql_store_result();
new Float:value;
if (samp_mysql_num_rows()!=0)
{
new tmp[256];
samp_mysql_fetch_row(tmp);
value = floatstr(tmp);
samp_mysql_free_result();
}
return value; // this line is the issue
}
"warning 213: tag mismatch"
Can anyone help?
P.S: Ignore all the somethings
Re: Can't Return Float Value? -
yezizhu - 13.04.2009
Float:Getsomething(someyhingid){
blabla.
return value;
}
Re: Can't Return Float Value? -
1337pr0 - 13.04.2009
thanks ^^
works now.
Re: Can't Return Float Value? -
yezizhu - 13.04.2009
np...Try to read pawn-lang.pdf^^