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 / weird problem reading files

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Dec 2011 00:36 Edited at: 21st Dec 2011 00:36
Given this code, the ONLY thing I should see on the screen is the value of count, a single number. However, look at the image of my output, it makes no sense!





"You're not going crazy. You're going sane in a crazy world!" ~Tick

Attachments

Login to view attachments
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 21st Dec 2011 01:05
With the first version of AppGameKit there was (and still could be) a bug with "Read String" that would actually read out the whole file. The solution was to use "ReadLine( )" instead of "ReadString( )". Give that a try, and if that doesn't work, mind posting the contents of the "dict7.txt" file.

Sean

mr_d
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 21st Dec 2011 01:08
I beleive it's because AppGameKit readstring from file takes the endofstring character as the null character.
if your strings are on seperate lines separated by either LF or LFCR then this will not be picked up and the whole file (or as much as it can fit in it's buffer) will be printed out.

Login to post a reply

Server time is: 2024-11-26 08:00:01
Your offset time is: 2024-11-26 08:00:01