can we see what your code looks like so we can find the error?
I see now. Instead of putting if PossibleFactor % 1 == 0
, I put if Num % 1 == 0
. It works now. When @D0RYU put N, I thought he meant Num.
1 Like
Hello
maybe you could convert the number to string to check if it contains decimal like:
num=15.5
if string.find(tostring(num),'%d%.') then
print("contain decimal")
else
print("no decimal")
end
isn’t that more code then my solution
seems unneeded
1 Like