This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
unobtanium's profile picture

textutils.serialize()

Started by unobtanium, 07 May 2014 - 11:41 AM
unobtanium #1
Posted 07 May 2014 - 01:41 PM
HELLO,

i am mad.
textutils got changed and doesnt write everything in a single line anymore.
All my savefiles are messed up and the programs dont work anymore.
Any fix or shall i make my own textutils.serialize now?
CometWolf #2
Posted 07 May 2014 - 02:31 PM
Queue "Watch your language!".

Are you saving multiple tables to single files? If so, you can just remove the newlines and spaces using gsub.

file.writeLine(string.gsub(textutils.serialize(tTable),"\n%S-",""))
Lyqyd #3
Posted 07 May 2014 - 03:26 PM
I don't care how mad you are, watch your language. Textutils.serialize changed for the better in 1.6. That update broke a lot of existing scripts for more reasons than the serialization change, but you're the first one that feels that they should come on the forums and cuss about it. Split it into multiple files or come up with a custom solution, like everyone else.