I want to check, if a number is divisible by another number:
for i = 1, 100 do
if i % 2 == 0 then
print( i .. " is divisible.")
end
end
This should work without any problems, but with the Lua in my server the script doesn't run if there is a % in the script... I dont know whats the reason, so is there any "replacement" for that? So I could check the number divsibility?
Thank you.
:S. - Cyclone%through. try '%%' or '\%' or '%25' - Javier%not working for me in Lua"? According to the Lua Documentation Lua supports the usual arithmetic operators: the binary + (addition), - (subtraction), * (multiplication), / (division), % (modulo), and ^ (exponentiation); and unary - (negation). - Simon Forsberg%operator. 5.1 and later however, does. See my answer. - Simon Forsberg