Hi everybody. (I use translator to translate into English)
I'm learning script writing for the game Guardian as well as LUA programming.
I have some questions that I hope someone can answer and help me with.
Problem 1: I have a paragraph like this
Date = "20240730"
date = os.date("%Y%m%d")
if date >= Date then
print([[⚠ SCRIPT EXPIRED ⚠]])
return
end
gg.alert("WELCOME")
In principle, it will expire at 00:00 on July 30, 2024. But if at 23:58 . Jul 29, 2024 I'm running a script, will it exit on the 30th or will the script continue?
problem 2:
Please help me write a scripts to view files and compare file contents. If the file content is different from the content I specified in the scripts, access to the script will be denied.
-- For example:
I have file read.txt
with content: <gameoffline = "offline" gameonline = "online">
In scripts I want to specify
If gameoffline = "offline" gameonline = "online" then continue, otherwise the scripts will exit
I hope everyone can help me with the 2 issues above.
Thank you very much.