after some time I was finally brave enough to work on my turtle program again but came across an issue I can't figure out myself. The complete program: https://pastebin.com/fptxKN9n
Sorry for the title by the way, I don't know how to put it in a few words.
I basically just want to print out the table variables.ignor.
The custom function, although irrelevant for this thread since it works and I've used it for years:
function Splitter(inputstr, sep) if inputstr == nil then return nil elseif sep == nil then sep = " " end local t={} ; i=1 for str in string.gmatch(inputstr, "([^"..sep.."]+)") do t[i] = str i = i + 1 end return t endThis function only takes a string as input, which is why I use textutils.serialize on my table before feeding it forward to the Splitter.
My complete command looks like this:
printWrapped(Splitter(textutils.serialize(variables.ignor), '\n "minecraft:'), 18, 4, w-18)And somewhere in here seems to be the mistake because instead of a somehow expected result, I get
{ s o , obbl s o , d , l v , low g_l v , w , low g_w , }
I hope you can show me what I did wrong and give a short explanation.
Thanks in advance,
Bruno
Edited by BrunoZockt, 14 July 2018 - 11:59 PM.