Solved Set the value to the player's last message

  • 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.
[doublepost=1544149644,1544149585][/doublepost]
code_language.skript:
on chat:
    set {_lastmessage.%player%} to message

command /seelastmessage [<offline player>]:
    trigger:
        if arg-1 is not set:
            send "&7Your last message was: &6%{_lastmessage.%player%}%"
        else:
            send "&6%arg-1%&7's last message was: &6%{_lastmessage.%arg-1%}%"
 
Last edited:
[doublepost=1544149644,1544149585][/doublepost]
code_language.skript:
on chat:
    set {_lastmessage.%player%} to message

command /seelastmessage [<offline player>]:
    trigger:
        if arg-1 is not set:
            send "&7Your last message was: &6%{_lastmessage.%player%}%"
        else:
            send "&6%arg-1%&7's last message was: &6%{_lastmessage.%arg-1%}%"
variables starting with an underscore {_example} are local to the event.
Meaning that variable would NOT be saved, and the command would not work
 
variables starting with an underscore {_example} are local to the event.
Meaning that variable would NOT be saved, and the command would not work
I did not know since I stopped using skripts and went back to Java.
 
Status
Not open for further replies.