Solved Wait for argument seconds?

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

Status
Not open for further replies.

Hakuyamu

Member
Oct 29, 2018
33
0
0
Hello!

In one of my Skripts I want to use a command which sets a variable to true and after a given time to false. This is an example:

code_language.skript:
command /wait <number>:
    trigger:
        message "&2The value has been set to true for %argument% seconds"
        set {value.%player%} to true
        wait argument seconds
        message "&4The value has been set to false"
        set {value.%player%} to false

If I create a new file within this code, I always get this resonse:

code_language.skript:
'seconds' is not a type (example.sk, line 5: wait argument seconds')

I really need anything like this that works and I have no plan how to solve this.
 

Attachments

  • 2018-10-29_17.33.24.png
    2018-10-29_17.33.24.png
    952.4 KB · Views: 221
im not sure if this will work, the devs of Skript have all said this is an issue, but you could try something like
code_language.skript:
wait "%arg-1% seconds" parsed as timespan
that may or may not work. Theoretically it should, but I know there's been issues with Skript in this one.
You could also try
code_language.skript:
set {_wait} to "%arg-1% seconds" parsed as timespan
wait {_wait}
 
Status
Not open for further replies.