This commit is contained in:
Evgeny
2021-08-04 22:13:11 +03:00
parent 5f893021ff
commit 11f9511c0d
2 changed files with 4 additions and 5 deletions

View File

@@ -33,12 +33,12 @@ function round(x, n)
return x / n
end
function table:has_value(val)
function table:get_index(val)
for index, value in ipairs(self) do
if value == val then
return true
return index
end
end
return false
return -1
end