Skript: The expression 'argument' can only be used within a command

Created on 20 Nov 2016  路  4Comments  路  Source: SkriptLang/Skript

This works on old Skript 2.2 but fails on your build. How do I get this to work on your version?

on chat:
    set {_waited} to difference between {spam.%player%.lastused} and now
    if player doesn't have permission "skript.spam":
        if {_waited} is less than 1 second:
            cancel event
            message "&2> &aChat: &7Don't spam! Wait 1 second to chat again."
            stop
        set {spam.%player%.lastused} to now

EDIT: The skript works, but I'm having tons of issues with errors even though all the skripts work as intended.

bug

Most helpful comment

Ah. Something is broken with offline player resolver, I fear.

All 4 comments

The code you pasted doesn't have an "argument". Did you paste wrong part of the skript? It would help to see the whole actual error in figuring out the problem. Also if you're using Skript for 1.11, don't. It's only for testing - for now.

There's nothing wrong with the code above. It should be perfectly fine.

The issue I have seems to be something totally different from what I initially thought--but there were still errors coming from this skript bizarrely.

The issues I'm having all have to do with using "offline player" and join and leave events. Here is the message I am receiving that crashes skript: "An error happened when trying to enably resolving offline players, so the feature has been turned off."

Ah. Something is broken with offline player resolver, I fear.

Is this fixed now or should this be closed? Not too sure what was the issue here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

dhgameryt picture dhgameryt  路  3Comments

ghost picture ghost  路  3Comments

Misio12320 picture Misio12320  路  3Comments

wohahobg picture wohahobg  路  3Comments