Raised This Month: $ Target: $400
 0% 

Floats, Strings & Mysql


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 07-12-2004 , 11:39   Floats, Strings & Mysql
Reply With Quote #1

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?
__________________
My Plugins

Got ??
AssKicR is offline
Ryan
Senior Member
Join Date: May 2004
Location: NH, USA
Old 07-12-2004 , 12:47  
Reply With Quote #2

Quote:
Originally Posted by float.inc
/* Convert a string into a floating point value */
native Float:floatstr(const string[]);
__________________
Warcraft 3: Expansion
Homepage | Downloads | Forums
Ryan is offline
Send a message via AIM to Ryan
BAILOPAN
Join Date: Jan 2004
Old 07-12-2004 , 12:58  
Reply With Quote #3

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)
__________________
egg
BAILOPAN is offline
AssKicR
Veteran Member
Join Date: Mar 2004
Location: Norway-Europe(GTM+1)
Old 07-12-2004 , 13:23  
Reply With Quote #4

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

Got ??
AssKicR is offline
BAILOPAN
Join Date: Jan 2004
Old 07-12-2004 , 13:33  
Reply With Quote #5

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

Code:
/* turtle */
__________________
egg
BAILOPAN is offline
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 07-12-2004 , 14:14  
Reply With Quote #6

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
__________________

BigBaller is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 07-12-2004 , 19:54  
Reply With Quote #7

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

but noone listens to me
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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