function setup()
--displayMode(FULLSCREEN)
r = {"Test", "Guys", "Government", "Song", "Simple", "Silly"}
parameter.text("Txt")
end
function draw()
background(0)
--sprite("Cargo Bot:Game Area", WIDTH/2, HEIGHT/2, WIDTH, HEIGHT)
fill(255)
fontSize(50)
for a, b in ipairs(oc_table_find(r, Txt)) do
text(b, WIDTH/2, HEIGHT - 50 * a)
end
end
oc_table_find = function(tab, str)
local t = {}
for a = 1, #tab do
if string.sub(tab[a], 1, #str) == str then
table.insert(t, #t + 1, tab[a])
end
end
return t
end
Here is a good function for searching a string in table. I have much more of these functions, even about Code Protecting Alert, More classes of other types. Do you want them to be released?