Minecraft Advent Calendar

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Hakuyamu

Member
Oct 29, 2018
33
0
0
Hello!

I need help with an advent calendar, which consists of different signs for each day. If you rightclick one of the sign, you will get free gifts. How can I check the current date? The players should only be able to get gifts for the current day or the past days.

Thanks :emoji_slight_smile:
 
That does not work

I tried this:
code_language.skript:
set {_tmptime} to now
 if day of month from date {_tmptime} is 1:

but it replies:
code_language.skript:
Can't compare a text with an integer
 
Try to see what
code_language.skript:
day of month from date {_tmptime}
returns
 
If I do
code_language.skript:
message "&F&lYour time: &a&o%day of month from date {aktuellezeit}%"
, it works and responds 26.
If it stands completely alone, there's an error.
[doublepost=1543343477,1543342334][/doublepost]How I compare a text and an integer? That seems to be the only problem
 
If I do
code_language.skript:
message "&F&lYour time: &a&o%day of month from date {aktuellezeit}%"
, it works and responds 26.
If it stands completely alone, there's an error.
[doublepost=1543343477,1543342334][/doublepost]How I compare a text and an integer? That seems to be the only problem
Parse it as an integer before you compare.
 
code_language.skript:
set {aktuellezeit} to now parsed as an integer

Returns:
code_language.skript:
'now' is not a text
 
Now I can compare them both, but the day changes every minute ??
Try the example in the docs link (send a screenshot or something like that from the output)
 
Yes but try it anyways to see what numers are working
 
Status
Not open for further replies.