Edit object makes invalid character when saving
Hi.
I'm using the Edit Object to save a text file. However, when I do this, the edit object adds an extra invalid character. Now normally you wouldn't be able to see this character in Notepad, but as I launched up the saved text file in Notepad++, the character appears to be a "NUL" value. Anyways, this wouldn't be of any problem if it wasn't because this character generates errors in LUA. Yes I've tried removing the character and then the errors disappear.
The errors are:
Code:
attempt to call a string value
attempt to call a nil value
I really need to figure a way to remove this character inside MMF2, or find a way to make the edit object not generate this extra character.
Thank you.
Re: Edit object makes invalid character when saving
Yes, for some reason a NULL (0x00) byte is added to the end of saved .txt files.
Re: Edit object makes invalid character when saving
i wonder what happened to crag's edit object since i believe it didn't do this (maybe MMF uses null-terminated strings and doesn't strip the nulls when it savs files)
you might be able to use the binary object to reload the save file and resave it at its current length minus one byte
Re: Edit object makes invalid character when saving
Found an easier way.
Loaded up the txt in the list object, and made it search and delete all "" lines.
That fixed it :D