Jump to content




Using Tables Read from another File


  • You cannot reply to this topic
2 replies to this topic

#1 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 14 October 2014 - 09:36 AM

I was working on the script for my Operating Enviroment, I have encountered some problems. When using the table I read from a file, it's not working as I want. I am trying to use the information in the table to label the computer, please help me figure it out. (I'm not this terrible, im tired. :3)

Code


#2 wieselkatze

  • Members
  • 221 posts
  • LocationGermany

Posted 14 October 2014 - 01:24 PM

So you wrote
local system = textutils.unserialise(file.readAll())
to bring your string back to a table.
Why
system = textutils.serialise(system)
?

This will just convert your table back to a serialized string.
Delete that line and it should work perfectly fine.

Also, the next time, please post your error message. If it "worked as you want", you wouldn't be in the Ask a Pro section ;)

Edited by wieselkatze, 14 October 2014 - 01:27 PM.


#3 cdel

  • Banned
  • 496 posts
  • LocationMelbourne, Australia

Posted 15 October 2014 - 05:35 AM

Thanks B)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users