president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hi my dear friends,
How I can check if the number is multiple of 3 and integer on lua? The part of multiple I did check below, but I'm facing some problems with the integer part.
Thanks.
How I can check if the number is multiple of 3 and integer on lua? The part of multiple I did check below, but I'm facing some problems with the integer part.
Code:
if tonumber(msg) and npcHandler.topic[cid] == 1 then
local n = tonumber(msg)
if (n % 3 == 1) then
npcHandler:say("This number is not multiple of three.", cid)
npcHandler.topic[cid] = 0
return true
end
end
Thanks.