AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Floats, Strings & Mysql (https://forums.alliedmods.net/showthread.php?t=3713)

AssKicR 07-12-2004 11:39

Floats, Strings & Mysql
 
when getting stuff from mysql you can only get it as string... Go figure

anyways... there is a str_to_num ... i need something like str_to_float... is there something like that?

Ryan 07-12-2004 12:47

Quote:

Originally Posted by float.inc
/* Convert a string into a floating point value */
native Float:floatstr(const string[]);


BAILOPAN 07-12-2004 12:58

Look at the includes for 0.20 DBI, you can use it like this:

new int = dbi_result(res, "field")
new Float:fl = 0.0
dbi_result(res, "field", fl)

AssKicR 07-12-2004 13:23

yes, but i don't got that yet, now do i BAIL

BAILOPAN 07-12-2004 13:33

I guess not :) I was saying it so you would know that it will exist in the future

Code:

/* turtle */

BigBaller 07-12-2004 14:14

Quote:

Originally Posted by AssKicR
yes, but i don't got that yet, now do i BAIL

Yea I wish I had that also BAIL :P

devicenull 07-12-2004 19:54

Yea, I still cant get int's correctly with this new module :/

but noone listens to me :P


All times are GMT -4. The time now is 14:53.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.