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

Table: 35Db24 Error?

Started by TyDoesMC, 30 July 2013 - 09:13 PM
TyDoesMC #1
Posted 30 July 2013 - 11: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!!
Tiin57 #2
Posted 30 July 2013 - 11:20 PM
You have to print

textutils.serialize(O)
TyDoesMC #3
Posted 30 July 2013 - 11:23 PM
Thank You :D/> , Its For My First Program Update, Where Do I Put This Line Of Code?

Never Mind Blonde Moment
TyDoesMC #4
Posted 30 July 2013 - 11:25 PM
When I Replace It With textutils.serialize(O) It Dosent Print Anything
Lyqyd #5
Posted 31 July 2013 - 12:19 AM
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.
TyDoesMC #6
Posted 31 July 2013 - 02: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/>
TyDoesMC #7
Posted 31 July 2013 - 02: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/>
Smiley43210 #8
Posted 31 July 2013 - 02: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.
TyDoesMC #9
Posted 31 July 2013 - 01:52 PM
Ok Thank You