HELP!!!

Discussion in 'Skript' started by Darrix_HD, Jul 23, 2018.

Thread Status:
Not open for further replies.
  1. What is wrong here?

    Code (Text):
    on sneak toggle:
        wait 1 tick
        if player has permission "lobby.firework":
            wait 1 tick
            if {%player%.fwCooldown} is more than 20:
                launch flickering ball firework colored red at player's location timed 0
                set {%player%.fwCooldown} to 2
                wait 20 seconds
                set {%player%.fwCooldown} to 21
     

    ERROR CODE:

    Starting a variable's name with an expression is discouraged ({%player%.fwCooldown}). You could prefix it with the script's name: {LobbySysv1byDarrix.%player%.fwCooldown} (LobbySysv1byDarrix.sk, line 336: if {%player%.fwCooldown} is more than 20:')

    There's no player in an on script load/unload event (LobbySysv1byDarrix.sk, line 343: set {%player%.fwCooldown} to 21')
     
  2. the problem is that you put player first : {%player%.fwCooldown} and not {fwCooldown.%player%}.

    but this error is strange to me, what version of skript is it?
     
  3. i dont know but i think the latest
     
  4. didnt work..

    ERRORS:

    [19:14:11 ERROR]: [Skript] '{fwCooldown.%player%}}' is not an entity type (LobbySysv1byDarrix.sk, line 338: set {fwCooldown.%player%}} to 2')
    [19:14:11 ERROR]: [Skript] '{fwCooldown.%player%}}' is not an entity type (LobbySysv1byDarrix.sk, line 343: set {fwCooldown.%player%}} to 21')
     
  5. You have doubled up your brackets at the end so change "{fwCooldown.%player%}}" to "{fwCooldown.%player%}"
     
  6. there are 2 brackets at the end
     
  7. thx but it doesnt work:

    There's no player in an on script load/unload event (LobbySysv1byDarrix.sk, line 343: set {fwCooldown.%player%} to 21')
     
  8. can u help me pls??
     
  9. prob you've to use %event-player% and not %player%
     
  10. [19:42:18 ERROR]: There's no player in an on script load/unload event (LobbySysv1byDarrix.sk, line 343: set {fwCooldown.%event-player%} to 21')

    im confused now...
     
  11. what version (dev) of skript is it?
     
  12. test this:

    on sneak toggle:
    wait 1 tick
    if player has permission "lobby.firework":
    set {_p} to player
    if {fwCooldown.%{_p}%} is more than 20:
    launch flickering ball firework colored red at player's location timed 0
    set {fwCooldown.%{_p}%} to 2
    wait 20 seconds
    set {fwCooldown.%{_p}%} to 21
     
  13. cant see it but i downloaded the latest ive found
     
  14. are you using an ON LOAD event somewhere?
     
  15. also to check your version to /ver skript
     
  16. i think so because it is like a conflict between this 2 events
     
  17. doesnt work there is no cooldown and when i sneak and unsneak it launches 2 fws :/
     
  18. have you changed all the variables name from %player%.fw to fw.%player%
     
  19. no i just used it one time...
     
  20. yes i did :D
     
Thread Status:
Not open for further replies.