SA-MP Forums Archive
SQLIte Float load problem - 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: SQLIte Float load problem (/showthread.php?tid=565495)



SQLIte Float load problem - vannesenn - 28.02.2015

Hi guys,
I have problem with load float value from SQLite database. I made tabel and I added field with REAL(float) type, but, when I try to load value and, by using floatstr func. convert string to float. string from field is 100 but, it can't convert string to float value and put that value in char array(value is under 255).

Код:
    db_get_field_assoc(dbRESULT, "Svjecice", dbQUERY, 14); _HRP_vSvjecice{_id} = floatstr(dbQUERY); // USKORO - OVDJE IMA PROBLEM S OČITAVANJEM
    printf("Q %s | S %f | FF %f", dbQUERY, _HRP_vSvjecice{_id}, floatstr(dbQUERY));
Result

Quote:

[01:55:21] Q 100.0 | S 0.000000 | FF 100.000000




Re: SQLIte Float load problem - vannesenn - 28.02.2015

Thanks