Hi,
table[1] is the first index of a table. Its value is the string 'Color: Orange'
Here i'm trying to just get the word 2 characters after the ':', using string.find
then string.sub
firstkey = table[1] pos = string.find(""..firstkey, ":") -- Position of ':' after = ( string.sub(""..firstkey, pos+2) ) -- Everything from two characters after ':' onwards print(after)
It doesn't work though, and the output says that it expected a string for string.find, instead it got a table.
Why is this and how can I fix it?
Thanks in advance.