Solved Reverse string

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

Scholler

Active Member
Aug 6, 2018
130
9
0
24
Hello, I want to create a command what can reverse text what I write there. So for ex. I type /reverse apple , I ge elppa. I already tried this, this is my script now
code_language.skript:
command /reverse <Text>:
    trigger:
        set {_c} to length of arg-1
        set {_a} to "%last character of arg-1%"
        loop {_c} times:
            set {_c} to {_c} - 1
            set {_a} to "%{_a}%%character {_c} of arg-1%"
        send "%{_a}%"
I think the problem is getting the character of the text. It can't get the next character of the string. I hope you understand me. Thanks for helping!

Sorry for my bad English
[doublepost=1545240837,1545240590][/doublepost]Okay, sorry, I didn't checked the docs. For someone with the same problem: just type 'send reverse arg-1'
 
Status
Not open for further replies.