Page 1 of 1

bms variable length strings

Posted: Fri May 13, 2016 2:14 am
by cheyrn
I've went through only one mrmouse youtube video so far, the one for etherlords.

Trying to do something similar with another file format, the file seems to be a sequence of null terminated 16-bit (utf-16le) characters, preceded and followed by other data that I haven't figured out. Can I use bms language to handle that?

I see I can set a variable to a string read from the current position in a file, but how do I then write that into an output file? Log/CLog want an explicit length. Is there a way to log the contents of a variable?

Re: bms variable length strings

Posted: Sat May 14, 2016 2:21 pm
by Gh0stBlade
Create a memory file, write the variable to that memory file then log it to a text file.

Re: bms variable length strings

Posted: Sat May 28, 2016 4:20 am
by cheyrn
Ah. I see memory files in quickbms syntax. I was first trying multiex syntax. Quickbms has strlen and the unicode type reads the text without needing to specify the length. So, I don't think I need the memory file. But, thanks for leading me to quickbms.