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.

Newcomers DBPro Corner / File writing help needed!

Author
Message
Omikronian
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 17th Feb 2003 01:24
I am trying to write variables to a file and this is the result when viewed with notepad or wordpad:

 :Sword Scale

The number I'm trying to write to the file is a float.
Thanks in advance
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Feb 2003 15:50
When you write a float to a file, the float is written in binary format.

If you want to write a human readable format to a file, you should convert the float to a string, then write the string, and when reading it back, read the string and then convert it back to a float.
xmen
21
Years of Service
User Offline
Joined: 27th Jan 2003
Location:
Posted: 17th Feb 2003 19:19
Try this hope it help

Omikronian
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 18th Feb 2003 02:50
Thanks xmen. It works great!

Login to post a reply

Server time is: 2024-11-24 01:20:28
Your offset time is: 2024-11-24 01:20:28