Jump to content
  • Advertisement

Archived

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

adam17

ASCII Importer

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

right now im writing an ASCII file importer and i can only get so far into the file before the program crashes. the last two lines look like this: *SCENE_TICKSPERFRAMEÑ— 160 (hopefully the last 2 characters show up on the end of the first line) do they look familiar? any way, i can only bring in 24 strings of characters. any ideas of where i should start looking first in my program? could it be the compiler messing up? i have made the file several times now and i know its not the file. please can someone provide some insight. thanks ahead of time. -adam

Share this post


Link to post
Share on other sites
Advertisement
Not really sure without code or anything, but two thoughts. First, make sure your memory is set up correctly, ie. you don''t have an array hardcoded to 24 lines. The other is appending a ''\0'' at the end of your lines. If you are printing out the text, and there isn''t a ''\0'', it may be trying to access memory beyond the end of the string. Just some thoughts.

Share this post


Link to post
Share on other sites
well ill be freakin damned. i was setting the input string as:
static char stream[sizeof(int)];
i changed it to:
static char stream[512];

that was a STUPID mistake on my part. sorta like semicolons lol.
thanks alot
-adam

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!