Posted 03 December 2013 - 04:02 PM
improvements:
the c and d functions are for error checking and convenience
http://pastebin.com/qqiL9ZWa
https://gist.github....iller64/7777388
for improved lua prompt serialization:
replace with
somewhere around line 55
edit: included a recursive version the only thing its missing is recursive table detection
- is not recursive
- has options for serialization, for example {nofunc=true} will disable the wall of b64
- can handle functions
- has better newline handling for strings
- proper recursive table detection
- removes extra commas in tables
- removes unnecessary brackets (will turn {["potato"]=true} into {potato=true}
- removes unnecessary keys (will turn {[1]=1,[2]=2,[3]=3} into {1,2,3})
- unserializer makes sure the string isnt calling any functions ("(function() while true do end end)()" crashes textutils)
the c and d functions are for error checking and convenience
http://pastebin.com/qqiL9ZWa
https://gist.github....iller64/7777388
for improved lua prompt serialization:
replace with
while (tResults[n + 1] ~= nil) or (n <= nForcePrint) do
print( pt.serialize( tResults[n + 1], { nofunc=true, nofalse=true, noerror=true } ) )
n = n + 1
end
where pt is the loaded apisomewhere around line 55
edit: included a recursive version the only thing its missing is recursive table detection
Edited on 06 December 2013 - 03:49 PM