replace all ... is not working

  • 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
So I'm making a ban system which can have a reason with multiple lines. And I think that in skript you have to do %nl%, not \n, so I tried:

Code:
set {_reason} to "%arg-2%"
set {banreason.%arg-1%} to replace all "\n" with "%nl%" in {_reason}
Help please
 
So I'm making a ban system which can have a reason with multiple lines. And I think that in skript you have to do %nl%, not \n, so I tried:

Code:
set {_reason} to "%arg-2%"
set {banreason.%arg-1%} to replace all "\n" with "%nl%" in {_reason}
Help please
Replace is an effect, so you need to remove the `set {banreason.%arg-1%} to` part, and the variable `{_reason}` will have the text with the replaced stuff
 
Replace is an effect, so you need to remove the `set {banreason.%arg-1%} to` part, and the variable `{_reason}` will have the text with the replaced stuff
I get this error (see image)
How do I fix this and how do I do the new line part?
 

Attachments

  • Screenshot_9.png
    Screenshot_9.png
    12.2 KB · Views: 128
I get this error (see image)
How do I fix this and how do I do the new line part?
1) You need SkQuery for the newline expression
2) Remove the quotes and percentage signs from the last variable.
 
Status
Not open for further replies.