set variable to random "string(not interger)"

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

Danic

Member
Jul 23, 2020
42
0
6
Korea
www.youtube.com
I know the code "set {variable} to random interger between <number> and <number>".
But I want to use interger as string.
This means that you want to specify a randomly set value as a character rather than number.
What code is possible?

This is code that I know.
Code:
set {variable} to random integer between 1 and 3
 
I know the code "set {variable} to random interger between <number> and <number>".
But I want to use interger as string.
This means that you want to specify a randomly set value as a character rather than number.
What code is possible?

This is code that I know.
Code:
set {variable} to random integer between 1 and 3
I just thought about this:
code_language.skript:
set {_char::*} to "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
set {_var} to random element out of {_char::*}
 
I just thought about this:
code_language.skript:
set {_char::*} to "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"
set {_var} to random element out of {_char::*}

Oh, Man! Help me!
This is a question that has nothing to do with this post, but I have the code below.
I want to change it to a statement that closes rather than open, but when I change "open" to "close", I get an error saying that it doesn't exist.
What syntax should I use?

Code:
open (metadata tag "vanillaGUI" of player) to player
 
Oh, Man! Help me!
This is a question that has nothing to do with this post, but I have the code below.
I want to change it to a statement that closes rather than open, but when I change "open" to "close", I get an error saying that it doesn't exist.
What syntax should I use?

Code:
open (metadata tag "vanillaGUI" of player) to player
This syntax work to me:
code_language.skript:
open metadata tag "vanillaGUI" of player
close metadata tag "vanillaGUI" of player
[doublepost=1596125210,1596125099][/doublepost]Also, I think it's a skript problem when trying to recognize that syntax. Because I also get an error when I use the syntax you mention.
upload_2020-7-30_12-6-33.png
 
Status
Not open for further replies.