Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Entering real numbers into editboxes

Author
Message
Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 24th Apr 2013 16:48
Hi guys,

is there anyway of entering real number into editboxes then converting them to a variable?

when i convert them to variables, everything after the decimal point reads 0. eg 123.45 is converted to 123.00


any thoughts?

Rickynzx
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 24th Apr 2013 16:55
Can you show the code you are using?

The EditBoxes wouldn't change the value when stored in a variable.

Are you sure that the variable you are storing it in is a float?

And what are you using to convert from the string to float?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Rickynzx
12
Years of Service
User Offline
Joined: 19th Dec 2011
Location: Troon, Scotland
Posted: 25th Apr 2013 15:28
thanks AL

you made me look at my code again, and found that i was using val() to convert instead of valfloat()

dont know how i missed that.

Rickynzx
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 25th Apr 2013 16:13
It happens to the best of us.

I have lost hours sometimes trying to find a bug and it turns out to be a single character or one wrong variable.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 12:15:09
Your offset time is: 2024-11-24 12:15:09