Well, after such a long time with no problems at all, here I am again begging for assistance
I am using a file (amoungst other things) for data storage
The sort of data it stores is not used often and is by no means suitable to be kept in RAM
The last part of the file consists of a string (not the variable type) of characters of varying length
At certain points (i.e. quitting the game), this entire string of characters nees to be removed from the end of the file
The file is already open (using OpenFile) during this "cleanup" to modify other characters in the file back to their original state, using SeekStream and WriteByte
Counting the number of characters on the end of the file is no problem, I can SeekStream to a marker "E:" which tells the engine where the string starts, however removing them is
After looking through the documentation, it would appear that BMax has absolutly no command that can remove characters from a file, without overwriting them with something else, thus meaning that the file can never get any shorter
Nor is there a command that simply shortens an open file, which I could use to shave off the right number of characters
I need a workaround thus to do the following:
-Remove a variable number of characters from the end of a file, or after the current "cursor" position in the file
This seems like a simple operation to me, and one that Blitz really should be capable of
This problem really couldnt have come at a worse time, as my new housemate is convinced that Blitz is very limited purely due to the fact that it isnt C++, and I am very eger to demonstrate that this is not the case
I am using a file (amoungst other things) for data storage
The sort of data it stores is not used often and is by no means suitable to be kept in RAM
The last part of the file consists of a string (not the variable type) of characters of varying length
At certain points (i.e. quitting the game), this entire string of characters nees to be removed from the end of the file
The file is already open (using OpenFile) during this "cleanup" to modify other characters in the file back to their original state, using SeekStream and WriteByte
Counting the number of characters on the end of the file is no problem, I can SeekStream to a marker "E:" which tells the engine where the string starts, however removing them is
After looking through the documentation, it would appear that BMax has absolutly no command that can remove characters from a file, without overwriting them with something else, thus meaning that the file can never get any shorter
Nor is there a command that simply shortens an open file, which I could use to shave off the right number of characters
I need a workaround thus to do the following:
-Remove a variable number of characters from the end of a file, or after the current "cursor" position in the file
This seems like a simple operation to me, and one that Blitz really should be capable of
This problem really couldnt have come at a worse time, as my new housemate is convinced that Blitz is very limited purely due to the fact that it isnt C++, and I am very eger to demonstrate that this is not the case