Try this:
-snip-
Alternatively, you may use WriteAnsiString and ReadAnsiString.
The pointer didn't work either. ShowMessage() still returns blanks, and the code to find the series of FF bytes only returns 0's.
ShowMessage "thinks" that a string has terminated if a zero byte has been found. So, if bufferNPCData[1] is #0 then ShowMessage will display an empty string.
I looked at the MAP files in your repository. They are all binary files. There's a high chance that they contain zero byte and other non-printable characters. Therefore, accessing their contents on the basis of strings is conceptually doubtful, I would define the buffer as an array of bytes instead because this would inhibit me from checking the contents of the buffer by means of string procedures.
But in order to find the structures and get to the data inside them, I need to:
Find occurrences of each set of FF bytes, starting with the longest (16 FF's) to the shortest (6 FF's)
Store the index of the found sets of FF bytes
Store the length of the found FF bytes
Depending on the number of the FF bytes, skip a certain number of bytes in the NPC structure
Push the next bunch of bytes to the GUI
When user saves the file, write the GUI entries back to their respective bytes
Far as I know, we are only able to search for a series of values with strings. Far as I know, there's no
pos() function for arrays, strings are designed for this sorta thing.
Geh.