Issues with infinite looping

  • 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 community!

    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!

TheeLegendary

Member
Sep 5, 2025
1
0
1
Hello,

I was rewriting a skript for a server I help with and I cannot seem to get this to work reliably and without causing the server to have to restart itself. The skript is supposed to open a menu and calculate price of a random teleport based on a weighted center. Once the user makes a choice they will be randomly teleported to a spot within the selected region. If the spot is either a Towny town or water it will try again (ideally) and it should only try twice and if not refund the player and tell them to try again. I added a limit to prevent a previous issue with ending up with an infinite loop of instant server crash.

I have attached the file to this post and I also made a PasteBin for it here
 

Attachments

  • trtp.sk
    17.4 KB · Views: 94