- 0
Please help me with the issue of expiry date and comparing file contents
-
Similar Content
-
Please Help
By X-Line,
- 11 answers
- 2,560 views
-
- 2 answers
- 1,156 views
-
- 1 answer
- 1,096 views
-
- 6 answers
- 2,225 views
-
- 1 answer
- 793 views
-
Question
NguyenVinh
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.
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now