Jump to content
  • Advertisement

Archived

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

Esap1

MAXSCRIPT working weird

This topic is 6707 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

In the article "MAXSCRIPT 3.0 for Game Developement" at http://www.gamasutra.com/features/19991008/maxscript_02.htm they give you a MAXSCRIPT that exports to a RTG(Real Time Game) format. Well when I exported one of my models, several of the Vertices Y component were like this: 300.035-e005. When I load this as a float it sets it to 0. Does anyone know how to fix this or why this happens? Thanks a Lot in Advance

Share this post


Link to post
Share on other sites
Advertisement
If your not understanding what Im saying, Im saying that sometimes in the Y component there is a "-e700", or "-e500" suffix on it. Then when I use fscanf(file,"%f",&var) on it, it doesnt load it right, it sets it to zero. Please someone just post even if you dont understand, just post something on this.

Share this post


Link to post
Share on other sites
I don''t know how to change the way MAX exports floats, instead I just wrote routines to accept scientific notation in my input module. Not too difficult, it is just a simple ASCII file after all.

Share this post


Link to post
Share on other sites
AH Crap, now the exporter isnt exporting anything but the header. Man, well, if it was is scientific notation what would it be?(sorry for such a stupid question).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
C expects floating point numbers in the format
300.0e-005.

So just change all the "-e" to "e-" and all
the "+e" to "e+"

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!