Solved Variable inside option

  • Thread starter Deleted member 5824
  • Start date
  • 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 community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
D

Deleted member 5824

Hi! It's hard to explain why I want this, but if
code_language.skript:
%{players.%player's uuid%.namecolor}%
is "Red", I want
code_language.skript:
{@%{players.%player's uuid%.namecolor}%}
to be the value of the option {@Red}
 
You can't have variables inside of options, you wil have to use something like this:
code_language.skript:
if {players.%player's uuid%.namecolor} is "Red":
    set {players.%player's uuid%.namecolor} to "{@Red}"
if {players.%player's uuid%.namecolor} is "Blue":
    set {players.%player's uuid%.namecolor} to "{@Blue}"
 
  • Like
Reactions: Deleted member 5824
I would make a placeholder and just replace it for your variable so something like this

code_language.skript:
options:
    something: &ayou have /money/ dollars

command /money:
    trigger:
        replace "/money/ " with "%{money::%player%}%"
        message "{@something}"

I have no idea if this will work but try it
 
  • Like
Reactions: Deleted member 5824
I would make a placeholder and just replace it for your variable so something like this

code_language.skript:
options:
    something: &ayou have /money/ dollars

command /money:
    trigger:
        replace "/money/ " with "%{money::%player%}%"
        message "{@something}"

I have no idea if this will work but try it
if that doesnt work try
code_language.skript:
options:
   MONEYY: you have \money dollars

command /moneyy:
   trigger:
      set {_list::*} to "{@MONEYY}"
      replace all "\money" with "%{moneyy::%player%}%" in {_list::*}
      send "%{_list::*}%"
 
  • Like
Reactions: Deleted member 5824
Status
Not open for further replies.