So this is what I have been created so far, but I dont know how to find the smallest number in that case it is 1, but how can I find it, if my integer starts at 1
so what I am trying is to print 8 and 1, but actually I had problems to find 1, so how can I fix it?
**
The script should even work if I change the start and the end number - also even when I unsort everything.
**
local numbers = {1,4,3,2,7,5,6,8}
function getlargesthighestnumber(a, largest)
local total = 0
for i = 1, #a do
if i > total then
total = i
end
end
return total
end
local miss = getlargesthighestnumber(numbers, 1)
print(miss)