I am attempting to see if a function, given a number, can return true or false depending on if that number is divisible by 4. I have attempted the following
function divby4(number)
local isdivby4 = false
local loopnum = 1
while isdivby4 == false do
function divby4(number)
local isdivby4 = false
local loopnum = 1
while isdivby4 == false do
wait()
if (4*loopnum) > number then break end
local result = number/(4*loopnum)
local resultclone = tostring(result)
if string.find(resultclone,"%.") ~= nil then
loopnum = loopnum +1
else isdivby4 = true break
end
end
return isdivby4
end
and it does work, but I feel like there is a more efficient way do to this.