#Skript Error..

1 messages · Page 1 of 1 (latest)

ashen plume
#

I don't know why this is getting an error.. help!

    trigger:
        if arg-1 and arg-2 is set:
            teleport arg-1 to location 0, 60, 0
            wait arg-2 seconds
            teleport arg-1 to location 0, 60, 0
        else:
            send "How to use: /Inmate (player you want to take) (Inmate time (second))" to player```
frigid oracle
ashen plume
#

error is this

frigid oracle
#

oh yh thats a weird skript bug that shouldnt happen, try setting a var to arg-2 and then using the var instead of arg-2

little sage
#

its not a bug

#

its because its not a timespan

#

a timespan is both the number and measurement, like 10 years or 4 days. Unfortunately you cant replace either with a variable.

#

they go together

#

you can change arg-2 to a timespan instead of an integer
or, if you really need the arg to still be an integer, you can loop arg-2 times: wait 1 second

#

.
and, use a command's built-in usage: property instead of checking if the args are set

grizzled gulch
#

imo parsing “%arg-1% seconds” as a timespan is a better method, doesn’t require looping and is more readable

frigid oracle