Jump to content




Table: 35Db24 Error?


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

#1 TyDoesMC

  • Members
  • 154 posts
  • LocationEarth

Posted 30 July 2013 - 10:13 PM

Help Me Please I Get This When Printing a Table.

--[[ Clean Boot ]]--
N = "Clean Boot System Protect"
B = "Boot"
R = "Recompile"
MT = "Make Temp"
E = "Exit"
version = "1.1"
O = {
   "Boot",
"Recompile",
"Make Temp",
   "Exit"
}
print(N)
print(version)
print("Options:")
print(O)

Please Help Me!!

#2 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 30 July 2013 - 10:20 PM

You have to print
textutils.serialize(O)


#3 TyDoesMC

  • Members
  • 154 posts
  • LocationEarth

Posted 30 July 2013 - 10:23 PM

Thank You :D , Its For My First Program Update, Where Do I Put This Line Of Code?

Never Mind Blonde Moment

#4 TyDoesMC

  • Members
  • 154 posts
  • LocationEarth

Posted 30 July 2013 - 10:25 PM

When I Replace It With textutils.serialize(O) It Dosent Print Anything

#5 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 30 July 2013 - 11:19 PM

You have to print the resulting string, like:

print(textutils.serialize(O))

Notice that he said you needed to print that, not just replace the print with that function call.

#6 TyDoesMC

  • Members
  • 154 posts
  • LocationEarth

Posted 31 July 2013 - 01:24 AM

o.o An Admin Answered My Post!, :D Thank You... Ima Noob Sorry, Sorry For Taking Your Time To Answer My Stupid Question :P

#7 TyDoesMC

  • Members
  • 154 posts
  • LocationEarth

Posted 31 July 2013 - 01:39 AM

Ok When I Use The Program It Show's It But With {[1] Example [2] Example Ect.
How Do I Print Only The Stuff In The Table
:P

#8 Smiley43210

  • Members
  • 204 posts

Posted 31 July 2013 - 01:43 AM

You need to loop through the values in the table, so you should use a for loop.
for _, v in ipairs(O) do
  print(v)
end
For this, you'd replace
print(textutils.serialize(O))
with the above.

#9 TyDoesMC

  • Members
  • 154 posts
  • LocationEarth

Posted 31 July 2013 - 12:52 PM

Ok Thank You





3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users