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 Infinity Loop?

Discussion in 'Skript' started by Flynn_LG, Feb 4, 2020.

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

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    Hey guys,

    Code (Text):
    1. command /test:
    2.     trigger:
    3.         if {test.%player%} is true:
    4.             set {test.%player%} to false
    5.             send "Test = False"
    6.         else:
    7.             set {test.%player%} to true
    8.             loop 1 times:
    9.                 broadcast "Test in on true!!!"
    10.                 wait 1 second
    11.             wait 1 tick
    How can I get an infinity loop that will spam this message? Please help and sorry for my bad english..

     
  2. Best Answer:
    Post #4 by PlaySkyHd, Feb 4, 2020
  3. AsuDev

    VIP

    Joined:
    Jan 27, 2017
    Messages:
    243
    Likes Received:
    21
    while loop
     
  4. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    How did you mean that?
     
  5. PlaySkyHd

    PlaySkyHd New Member

    Joined:
    Oct 20, 2017
    Messages:
    5
    Likes Received:
    0
    You can make:

    while player is online:
    broadcast "Hey"
     
    • Agree Agree x 1
  6. Legora

    Legora Member

    Joined:
    Feb 5, 2020
    Messages:
    4
    Likes Received:
    0
    It's usually what you will want to do. You don't want the server to be doing loops for nothing if the player leave the game.
    +1 this answer
     
  7. Flynn_LG

    Flynn_LG Member

    Joined:
    Nov 4, 2019
    Messages:
    38
    Likes Received:
    1
    Thank you :emoji_wink:

    Closed!:emoji_octagonal_sign:
     
Thread Status:
Not open for further replies.

Share This Page

Loading...