1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Can someone help me console not executing command

Discussion in 'Skript' started by mahdi, Jul 9, 2021.

Tags:
Thread Status:
Not open for further replies.
  1. mahdi

    mahdi Member

    Joined:
    Jun 22, 2021
    Messages:
    4
    Likes Received:
    0
    command /joindungeon:
    trigger:
    if {dungeon.begin} is false:
    if {dungeon.%player%.begin} is false:
    set {dungeon.%player%.begin} to true
    add player to {dungeons.players.list::*}
    add 1 to {dungeon.playercount}
    teleport player to {dungeon.wait}
    if {dungeon.playercount} is equal to 2:
    make console execute command "dungeon begin"
     
  2. Best Answer:
    Post #2 by couger44, Jul 9, 2021
  3. couger44

    Supporter

    Joined:
    Feb 19, 2017
    Messages:
    714
    Likes Received:
    31
    Did you try to debug all lines? There may be an error when it comes to reading the conditions data.

    Also, I think it would be easier to code it like this:

    Code (Skript):
    1. command /joindungeon:
    2.     trigger:
    3.         if {dungeon.begin} is not set:
    4.             message "Debug 1"
    5.             if {dungeon.%player%.begin} is not set:
    6.                 set {dungeon.%player%.begin} to true
    7.                 add player to {dungeons.players.list::*}
    8.                 add 1 to {dungeon.playercount}
    9.                 teleport player to {dungeon.wait}
    10.                 message "Debug 2"
    11.                 if {dungeon.playercount} = 2:
    12.                     console command "dungeon begin"
    13.                     message "Debug 3"
    So when you want to change the value of {dungeon.begin} and {dungeon.% Player% .begin} just delete the data from them.
    Code (Skript):
    1. delete {dungeon.begin}
    2. delete {dungeon.%player%.begin}
    This last thing is just like i like. You can ignore it.
     
  4. mahdi

    mahdi Member

    Joined:
    Jun 22, 2021
    Messages:
    4
    Likes Received:
    0
    Thanks
     
Thread Status:
Not open for further replies.

Share This Page

Loading...