So with this line of code, a chat appears with a clickable text running /spectate:send "&c&l%player% &7reported &c%arg-1%&c! <command:/spectate arg-1>&4[Click Here]<reset>" to {staffList::*}But now the command reads argument 1 as 'arg-1' and not as the actual argument sent by the player. So I figured I should put %% around arg-1 like this: <command:/spectate %arg-1%>&4[Click Here]<reset>But what happens now is this: (watch the picture). So the text is no longer clickable and just prints the command like text. How could I fix this?
#Clickable text error
1 messages · Page 1 of 1 (latest)
send formatted
Code Blocks
To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:
```
Code here
```
Indentation in Skript
In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.
A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:
With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:
Oh my bad!
command /report <player>:
trigger:
send "&c&l%player% &7reported &c%arg-1%&c! <command:/spectate %arg-1%>&4[Click Here]<reset>" to {staffList::*}
command /spectate <player>:
trigger:
if {staffmode::%player's uuid%} is not set:
execute player command "/staffmode"
teleport player to arg-1
send "&aNow spectating &2%arg-1%&a!" to player
So on line 3 with the %% around arg-1 in the command part this happens now:
send formatted
wtf is formatted?
!format
Code Blocks
To make it easier for others to read your code, it is asked that you send it in a code block. On Discord, you can simply send this:
```
Code here
```
idk
those dots don't work for me
yeah they do, but I already sent that
trigger:
send "&c&l%player% &7reported &c%arg-1%&c! <command:/spectate %arg-1%>&4[Click Here]<reset>" to {staffList::*}
command /spectate <player>:
trigger:
if {staffmode::%player's uuid%} is not set:
execute player command "/staffmode"
teleport player to arg-1
send "&aNow spectating &2%arg-1%&a!" to player```
colin meant send formatted "text here"
Nothing changes
For smth like /warp map it works fine
don't use execute player/console commands
replace it with the code that /staffmode runs
Changed it, unfortunately doesn't fix the problem, same issue
Ohhh
Got it
You are trying to use a command that is defined after
Move the /spectate above
@uncut ermine
Still the same issue
Also the same problem
I think the problem is in this partsend "&c&l%player% &7reported &c%arg-1%&c! <command:/spectate %arg-1%>&4[Click Here]<reset>" to player
Cus with the %% around arg-1 this part will be sent as regular text.<command:/spectate %arg-1%>But without the %% the command doesn't recognise arg-1 as player, but as text, so the player will not be recognised
Try /spectate (your IGN)
Like /spectate xef5000
See if this works
If it does, the problem is from the %arg-1%
Yeah it works with my username, so the problem is with %arg-1%, but I rly wouldn't know how to fix this :p
Try <command:/spectate player-argument>
Doesn't recognise the player
Screenshot?
Then this happens and the text is no longer clickable
Bruhhhhhhhhhhhhhh
Reason why skript is bad :
I understand the problem
But it's dumb
Try adding spaces?
Between >[
And :/
And OmeGerroe >
send formatted " "
<command: /spectate %player-argument% > [Click here]
At least now it detects the player
It still sends as regular unclickable text tho :/
Yep..
Even this?
Yep even with that
Strange right? xD
send "<command/spectate %player-argument%>clickhere"```
Try this
To see if second message works
Maybe it's having a hard time making parts of text clickable
second message also comes as regular text
Yo same problem as you
json("%loop-player%", "%player's display name% &9&l» &r%message%||ttp:&cClick to report &a%player%&c.||cmd:/chatreport %player% %message%")
brother what you mean by formatted
my guy is trying to help me and you keep complaining about formatted
we use ` , who tf cares
i don't think you understand
Ok so json("%targets%", "text||ttp:your tooltip||cmd:/example")
send formatted "<tooltip:Hover omg!>Hover over me!<reset>"
json("%targets%", "&c&l%player%&r &7reported &c%player-argument%||ttp:your tooltip||cmd:/example")
json("%targets%", "&c&l%player%&r &7reported &c%player-argument%||ttp:Click to Spectate||cmd:/spectate %player-argument%")
The addon was made in 2017 for 1.11
💀
Only similar case Found on the internet
you're bad
You can try making a function that passes all arguments maybe
If you can help, go ahead caus i'd like to see what's the solution
.
.
.
Actually you're onto something. Add 'formatted'
I tried formatted already
skUnity Forums
Can someone show me how to make a link clickable to open the website (use example website as discord.gg) and execute commands clicking text in chat...
Text is fine, tho it is still not clickable
maybe if you elaborate a bit instead of 2 words it'd be a little clearer
No you didn't
Yes I did??
Send code
send formatted "<command: /spectate %arg-1% >&4[Click here]" to player
To player
behind??
