valithor, on 29 July 2016 - 12:07 AM, said:
You would need to manually loop through the table and see if the string is in there by comparing each entry to the string you are looking for.
example function:
function check(tbl,str)
for k,v in ipairs(tbl) do
if v == str then
return true
end
end
return false
end
Example usage:
if check(tableToCheck,StringToCheckFor)
I have tried both with speech marks and without, Everything it returns on if statements is this:
startup:107: attempt to index ? (nil value)
line 107
if check(sql["oss"]["users"]["username"], username_input) == true then
valithor, on 29 July 2016 - 12:07 AM, said:
You would need to manually loop through the table and see if the string is in there by comparing each entry to the string you are looking for.
example function:
function check(tbl,str)
for k,v in ipairs(tbl) do
if v == str then
return true
end
end
return false
end
Example usage:
if check(tableToCheck,StringToCheckFor)
I have tried both with speech marks and without, Everything it returns on if statements is this:
startup:107: attempt to index ? (nil value)
line 107
if check(sql["oss"]["users"]["username"], username_input) == true then