1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Execute string as Skript code

Discussion in 'Skript' started by Xander402, Nov 7, 2020.

Tags:
Thread Status:
Not open for further replies.
  1. Xander402

    Xander402 Member

    Joined:
    Aug 20, 2019
    Messages:
    3
    Likes Received:
    0
    Hello, everyone
    Came to ask just one simple question. Is it possible to execute a string as Skript code in any way?

    Example:
    Code (Text):
    1. function("set {_x} to 'hello from the string'")
    2. function("send {_x} to all players")
    3. # or
    4. expression "set {_x} to 'hello from the string'"
    5. expression "send {_x} to all players"
    would print:
    Code (Text):
    1. hello from the string
    on the chat
     
  2. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
  3. Xander402

    Xander402 Member

    Joined:
    Aug 20, 2019
    Messages:
    3
    Likes Received:
    0
    I see. So what you're doing is basically creating a temporary script out of a chat message and executing it right away. Not at all what I expected, but very clever.
    Thanks and, by the way, could you please update the documentation with valid images? :emoji_wink: The links that are present in the spoilers take me to the main page of an image hosting service.
     
    #3 Xander402, Nov 7, 2020
    Last edited: Nov 7, 2020
  4. novastosha

    novastosha Well-Known Member

    Joined:
    Jan 11, 2019
    Messages:
    344
    Likes Received:
    22
    Oooh, Sorry, They must've expired
    --- Double Post Merged, Nov 8, 2020, Original Post Date: Nov 8, 2020 ---
    Ok to use it,

    Type in chat

    \send "blah"

    this is for a single line of code

    and for multiple lines

    \send "blah"|send "bruh"
     
Thread Status:
Not open for further replies.

Share This Page

Loading...