Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


VB doesn't understand!

This topic is 5959 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Public Type tMan x as integer y as integer End Type Public Man as tMan Man.x = 1200.001 Man.y = 100 Text1.text = Man.x + Man.y Text1.text = 1300 Text1 for some reason leaves out the decimals!!! WHY?? Please help. Thanks

Share this post

Link to post
Share on other sites
Your x and y variables within the structure are defined as integers. Define them as Single and you should get the result you expect. Otherwise, VB will truncate off your float assignments and convert them to integers.

Text1 isn't leaving out the decimal. Man.x is.

[edited by - Waverider on June 27, 2002 2:45:49 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!