Normally sending "&c%player%&r: &7%{_m}%" to {nadmins::*} would send the message to all players in that variable. However, its not functioning correctly for me. I have confirmed the player is being added to the variable and the message is being saved as {_m} correctly. The issue is who its sending it to. I'm using BungeeSK and am wondering if that may be causing issues. If you have an answer please reply (please avoid using loops).
#Sending message to a variable (BungeeSK) [Skript version for Minecraft 1.8]
1 messages · Page 1 of 1 (latest)
command /mm [<text>]:
trigger:
if player doesn't have the permission "modchat.use":
send "Unknown command. Try ""/help"" for help."
stop
else:
if arg-1 is not set:
send "&cPlease specify a message to send."
stop
else:
set {_m} to arg-1
broadcast "%{_m}%"
send "&c%player%&r: &7%{_m}%" to {nadmins::*}
Oh.
- Use code blocks; ```code here ```
- You dont need these “guard clauses”, as
- a) a command has built-in properties for permissions and usage
- b) the whole point of guard clauses is to not nest. (The
stopallows you to not indent, but you indent inside an else anyways) - should also use else ifs
- Use
<>for mandatory arguments, and[<>]for optional ones
And broadcast the list, make sure it actually contains some players
I've already done this, players are contained in the variable. I also dont use <> because I want to use my own custom message when the player does not complete the command.
; good luck