Skript infinitely repeated itself

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

Status
Not open for further replies.

zacty

Member
Jan 31, 2017
1
0
0
Hi everyone, I'm very new to coding in skript, please help me solve the following issue - When I do /ghostfix, skript will send an error message saying: The script 'ghostfix.sk' infinitely repeated itself! I don't know how to stop the trigger, so if someone could help me, that would be highly appreciated! Thanks in advance.

command /ghostfix:
trigger:
push the player upwards at speed 1.0
wait 0.5 seconds
push the player downwards at speed 1.0
send "hi"

on command "/ghostfix":
make player execute command "/ghostfix"
 
First of all, read this tutorial and follow all the steps please:
https://forums.skunity.com/threads/how-to-get-help-faster.284/

Now, regarding your issue, you're detecting if the player do the command "/ghostfix" with the on command event and then making that player execute the same command, it's detecting and executing the command everytime, how it wouldn't be infinitely repeated itself?
 
on command "/ghostfix":
make player execute command "/ghostfix"

This Will check wenn /ghostfix is executed then you make THE player execute THE command /ghostfix what Will be detected again if you remove this part iT would work
 
code_language.skript:
command /ghostfix:
    trigger:
        push the player upwards at speed 1.0
        wait 0.5 seconds
        push the player downwards at speed 1.0
        send "hi"       
        stop
try this?
 
Adding a stop to the command won't help anything... like Pyon said, if you're making a command execute itself (or detecting the command executing and executing it again) before a wait, then executing it again will trigger it again, which will trigger it again, which will trigger it again... forever.
 
Status
Not open for further replies.