Solved Underscore variable not working

  • 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.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
Question: How do i make variables like {_This} show numbers in chat?

CODE:
code_language.skript:
command /test:
    trigger:
        open chest with 5 rows named "Test" to player
            format gui slot 9 of player with 1 iron sword named "&aBerserk &7(Lvl %{Strength::%player%}% / 10)" with lore "&a▶ &7Click to upgrade this skill || ||&eEffect:||&e◆  &7Damage &a➟ &f+0.1 &eDmg||&e◆ &7Current Damage &a➟ &f%{_STR.%player%}% &eDmg|| ||&7Cost: &e7 ❂|| ||&cInfo: &7Increases dmg (ignores armor)||&cNote: &7Only affects Axes + Swords||&cMax: &7Deal 2 extra &c❤&7's" to run player command "/purchup1" with left click
            
on join:
    set {_STR.%player%} to 0.1 * {Strength::%player%}
    
#Strength
on damage:
    set {_Dmg} to 0.1 * {Strength::%attacker%}
    if tool of attacker is sword:
        damage the victim by {_Dmg} hearts
    if tool of attacker is axe:
        damage the victim by {_Dmg} hearts
[doublepost=1501873834,1501873562][/doublepost]The thing is, whenever you hover over the item with the variable in it, it just says <none>
 
Local variables disappear after the event ends. Meanwhile, global variables are stored anywhere.
 
Oh, ok gotcha, thanks man!
[doublepost=1501874006,1501873930][/doublepost]Also, how do I make my posts say (SOLVED) at the top? someone kept telling me to do so, but idk where to do it
 
It automatically sets to solved when you tag someone's comment as a solution to the issue.
 
Status
Not open for further replies.