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.

Message two texts in one line

Discussion in 'Skript' started by Hibrocolomedio, Jun 20, 2018.

Thread Status:
Not open for further replies.
  1. Hibrocolomedio

    Joined:
    Dec 14, 2017
    Messages:
    18
    Likes Received:
    0
    Skript Version (do not put latest): Skript dev35b
    Skript Author: Bensku
    Minecraft Version: 1.12.2
    ---

    Full Code:
    Code (Skript):
    1. options:
    2.     prefix: "&6[&4Broadcast&6]&a "
    3.  
    4. command /broadcast <text>:
    5.     aliases: /bc
    6.     permission: "test.broadcast"
    7.     trigger:
    8.         message "{@prefix}%arg 1%" to all players
    Errors on Reload:

    Can't understand this condition/effect: message ""&6[&4Broadcast&6]&a "%arg 1%" to all players (Test.sk, line 8: message "{@prefix}%arg 1%" to all players')

    Console Errors: none

    Addons using (including versions):
    Skellett 1.9.6b

    Troubleshooting: Yes

    Have you tried searching the docs? Yes
    Have you tried searching the forums? Yes

    What other methods have you tried to fix it?
    I've tryed changing the wrong line to:
    Code (Skript):
    1. message "{@prefix}%arg 1%" to all players
    2. message {@prefix} arg 1 to all players
    3. message "%{@prefix}%%arg 1%" to all players
    4. message "{@prefix}" %arg 1% to all players
    5. message {@prefix} "%arg 1%" to all players
    6. message "{@prefix}"%arg 1% to all players
    7. message {@prefix}"%arg 1%" to all players
    Non of which work. The only version it worked was the following:
    Code (Skript):
    1. message {@prefix} and arg 1 to all players
    but this wrote them in two separate lines, and I want it to write it to one line.
     
  2. TPGamesNL

    Moderator Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    You have to use
    Code (Skript):
    1. options:
    2.     prefix: &6[&4Broadcast&6] &a
    because Skript will sort of replace all of the options with their corresponding value when loading. That means that Skript will see the line as this:
    Code (Skript):
    1. message ""&6[&4Broadcast&6]&a "%arg 1%" to all players
    and that has has invalid quotation marks
     
  3. Hassan7000

    Hassan7000 Member

    Joined:
    Mar 12, 2018
    Messages:
    23
    Likes Received:
    3
    Code (Skript):
    1.  
    2. options:
    3.    prefix: "&6[&4Broadcast&6]&a " Remove the quotation marks and
    4. command /broadcast <text>:
    5.   trigger:
    6.       broadcast "{@prefix} %arg-1%"
    7.  
     
  4. TPGamesNL

    Moderator Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    Message all players will send it to all players, broadcast will also include console. It's just what you prefer.
     
  5. Hassan7000

    Hassan7000 Member

    Joined:
    Mar 12, 2018
    Messages:
    23
    Likes Received:
    3
    yeah but its the same thing and eaiser
     
  6. Hibrocolomedio

    Joined:
    Dec 14, 2017
    Messages:
    18
    Likes Received:
    0
    Is broadcast in Skript or skUnity?
     
  7. TPGamesNL

    Moderator Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    broadcast is a Skript effect (broadcast %string%)
     
  8. Hibrocolomedio

    Joined:
    Dec 14, 2017
    Messages:
    18
    Likes Received:
    0
    Thanks everyone!
     
Thread Status:
Not open for further replies.

Share This Page

Loading...