#send value of variable in chat

1 messages · Page 1 of 1 (latest)

obsidian crystal
#

how do I send the value of the variable scaffoldToggled to the player on line 32?
also please fact check what i have so far
thanks

potent girder
#

error is on line 2

#

you have :::: as a separator

obsidian crystal
#

only two colons?

potent girder
#

yes

obsidian crystal
#

ok now i have this error

#

?

potent girder
#

also, i dont recommend having things that are disabled set to false, as then they are still a set variable, taking up space. you can delete them.

#

that line

#

it that the entire line?

obsidian crystal
#

line 32 I want to send the value of the var

#

how do I do that

#

also how do I use players uuid

potent girder
#

what is this colon here for?

obsidian crystal
#

idk bro

#

how many colons should i have on line 24

potent girder
obsidian crystal
#

whats the error abt im confused

potent girder
#

this code and this error dont line up

obsidian crystal
#

I refreshed.

potent girder
#

just remove the variables: section

#

you dont even need it

obsidian crystal
#

now a syntax error

potent girder
#

yeah, remove that too

#

you dont need to have it set to false

#

you dont need it set at all

obsidian crystal
#

then this wouldnt work

potent girder
#

you can just have it as true or deleted

#
  set {a} to true
  send "enabled"
else:
  delete {a}
  send "disabled"``````if {a} is set:
  #its enabled
if {a} is not set:
  #its disabled```
obsidian crystal
#

how do I send value of var in chat

potent girder
#

like the uuid

#

anything thats not literal text needs to be in percents

obsidian crystal
#

what

#

this is the line

send "&cScaffold: scaffoldToggled::%player's uuid%" to player

send it fixed
I dont understand where to put the percentages

#

this is confusing

potent girder
#

inside of quotes is text. literal text. anything inside them will be sent
Putting percents in a string tells skript that there is not literal text there, and it has to execute that section as code```send "Hello, player, welcome!" to player
-> "Hello, player, welcome!"
"My favourite number is: 8 + 4" to player
-> "My favourite number is: 8 + 4"

"Hello, %player%, welcome!" to player
-> "Hello, Tectonic, welcome!"
send "My favourite number is: %8 + 4%" to player
-> "My favourite number is: 12"```

obsidian crystal
#

do I do it like this because i'm confused

potent girder
#

you still need the curly braces; its a variable