Solved Status Effect Command

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

CKR367

Member
Feb 1, 2017
64
2
0
HELP!
So, it says that Skript cannot understand this condition...

code_language.skript:
set {_effectamp} to argument 3 parsed as integer
set {_effectlength} to argument 4 parsed as integer
loop all players:
    apply swiftness {_effectamp} to loop-player for {_effectlength} seconds
Here is the error:

[11:39:13 ERROR]: Can't understand this condition/effect:
('apply swiftness {_effectamp} to all players for {_effectlength} seconds')
 
It's because Skript doesn't let you use a variable in place of the number for a timespan, so the part breaking it is `{_effectlength} seconds`. Change it to this:

code_language.skript:
apply swiftness {_effectamp} to loop-player for "%{_effectlength}% seconds" parsed as a timespan

That will force Skript to parse & recognize the "number indicator" pattern as an actual timespan.
 
It's because Skript doesn't let you use a variable in place of the number for a timespan, so the part breaking it is `{_effectlength} seconds`. Change it to this:

code_language.skript:
apply swiftness {_effectamp} to loop-player for "%{_effectlength}% seconds" parsed as a timespan

That will force Skript to parse & recognize the "number indicator" pattern as an actual timespan.
Oh, thank you! Appreciate your help.
 
Status
Not open for further replies.