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!

__LEEIF__

New Member
Dec 13, 2023
8
0
1
18
so I am trying to make it so everyone get the advent calendar tokens but I don't want the same person to get it twice but it can't understand "cancel event"

every 1 second:
loop all players:
if {given.advent%loop-player%} is false:
give loop-player green glazed terracotta of mending 1 named "&c&lDay 2"
set {given.advent%loop-player%} to true
if {given.advent%loop-player%} is true:
cancel the event
 
so I am trying to make it so everyone get the advent calendar tokens but I don't want the same person to get it twice but it can't understand "cancel event"

every 1 second:
loop all players:
if {given.advent%loop-player%} is false:
give loop-player green glazed terracotta of mending 1 named "&c&lDay 2"
set {given.advent%loop-player%} to true
if {given.advent%loop-player%} is true:
cancel the event
Your issue is that the cancel event line doesn't work with your code. You're basically trying to cancel the event of the loop which happens every second (Which is impossible). To solve this; either remove the cancel event entirely or replace it with a 'stop' (Sometimes I will just remove that sort of thing in my code and have nothing after it).
 
Your issue is that the cancel event line doesn't work with your code. You're basically trying to cancel the event of the loop which happens every second (Which is impossible). To solve this; either remove the cancel event entirely or replace it with a 'stop' (Sometimes I will just remove that sort of thing in my code and have nothing after it).
well it's giving everyone the block every second but I need it to give it to everyone but if they have already gotten it they shuldn't get it again
 
well it's giving everyone the block every second but I need it to give it to everyone but if they have already gotten it they shuldn't get it again
you're... cancelling a second??? Removing that line will make it work completely
 
you're... cancelling a second??? Removing that line will make it work completely
well 1, it didn't work 2, it doesn't understand the "cancel event" if you were to of read the description you would of known that