• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua How to check if is Date

Sigoles

Discord: @sigoles
Joined
Nov 20, 2015
Messages
1,209
Solutions
2
Reaction score
154
I tried:

LUA:
if os.date("%d") == 25 then
-- something
end

dont worked, ideas? tfs 1.2
 
Solution
Because os.date("%d") returns a string and you are comparing it to a number. Convert string to number with tonumber and it should work.

LUA:
if tonumber(os.date("%d")) == 25 then
print("true")
end
Back
Top