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.

DarkBASIC Professional Discussion / Will someone help me... won't write/read correctly!

Author
Message
Inkybro
23
Years of Service
User Offline
Joined: 31st Dec 2002
Location: Where I live :)
Posted: 4th Sep 2003 07:01
Hey, I wrote this simple program earlier (source tab at bottom). I have been working very hard and today made a program to read the txt files this exports. Woohoo, all worked great besides that it's not getting the number variables (which were for some reason written as "r"s in the .txt file). If someone would kindly take a look at my source and see whats wrong I'd greatly appreciate it!

Thanks!

Don't turn your back on me, I won't be ignored! Faint - Linkin Park

One minute your on top! Next you're not, watch you drop! Linkin Park- Hit the Floor
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Sep 2003 10:13
At least part of the problem is that you are reading your values into float variables and writing out integer values

Line 18 : Input crdhlth#
Line 104 : crdhlth as byte
Line 111 : Write Byte 1,crdhlth

'crdhlth' and 'crdhlth#' are two different variables that just happen to have almost the same name. Either remove the '#' from the float variables to make them integers, or add it to the ones without it to make them floats, change the write commands to write floats and remove the byte declarations (lines 104-106).

Login to post a reply

Server time is: 2026-07-24 00:18:33
Your offset time is: 2026-07-24 00:18:33