Binary Writing

This forum is currently in read-only mode.
From the Asset Store
A cool way for kids to write and practice English Alphabets
  • Hi. I'm having trouble with writing files with the binary object. I've looked on the wiki and here and didn't find the answer.

    It seems when I write to a file, it keeps appending to the end of the file. I set the binary cursor to 0 and even tried deleteing the file so it always creates a new one, but it looks like it just pastes what was previously in the file.

    My code looks something like this:

    Binary: Set cursor to 0

    Binary: Write string (Text feild object)

    Binary: Write integer (Text Box) //This is repeated for a few different text boxes

    Binary: save to file (Dialog.firstselectedfile)

    Thanks!

  • Posting a cap would be helpful when you ask for help that way we can better help you.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • A late reply; setting the cursor during writing has no effect, it's only for reading.

  • A late reply; setting the cursor during writing has no effect, it's only for reading.

    Interesting, but is there a reason why it's appending the data to the end of his file?

    My first thoughts were to delete the file and create a new one with the new data, but I see that he's already done that, and the old data that was in the deleted file is still written to the new file before the new data is written.

    Sounds like a bug to me.

    Sponge.

  • If you use write actions, then save, the written data's still in the object. Perhaps a 'clear' action is needed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)