Please help/give advise

  • 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 comminuty!

    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!

tsusuace1

Member
Jan 9, 2024
3
0
1
22
addons:
skbee, skquery, skript-gui, skript-reflect

Issue: for some reason i can't seem to call {hemvaluedef::%player%} or {true::%player%} outside of the on player armor change: event

I'm still kind new to skript but to my understanding these are not local vars a local var would be soemthing like {_hemvaluedef::%player%} i oould be ver wrong tho



code:

Code:
on player armor change:
    set {_item} to event-item

    if {_item} is a helmet:
        wait 1 tick
        set {hemvaluedef::%player%} to int tag "def" of nbt of {_item}
        set {hemvaluehp::%player%} to int tag "hp" of nbt of {_item}
        set {hemvaluestr::%player%} to int tag "str" of nbt of {_item}
        set {hemvaluecc::%player%} to int tag "cc" of nbt of {_item}
        set {hemvaluecd::%player%} to int tag "cd" of nbt of {_item}
        set {hemvaluemana::%player%} to int tag "mana" of nbt of {_item}
       
    if {_item} is air:
        set {hemvaluedef::%player%} to 0
        set {hemvaluehp::%player%} to 0
        set {hemvaluestr::%player%} to 0
        set {hemvaluecc::%player%} to 0
        set {hemvaluecd::%player%} to 0
        set {hemvaluemana::%player%} to 0
   
    set {true::%player%} to {hemvaluedef::%player%} + 1


on load:
    wait 20 tick
    broadcast "%{true::%player%}%"



Thank you very much for your time.
 
Last edited:
So, what is the issue? You say: "Issue: for some reason i can seem to call {hemvaluedef::%player%} or {true::%player%} outside of the on player armor change: event." How is that an issue, being able to call them in another event?
 
So, what is the issue? You say: "Issue: for some reason i can seem to call {hemvaluedef::%player%} or {true::%player%} outside of the on player armor change: event." How is that an issue, being able to call them in another event?
i can't call them thats the issue my bad
i ment to say can't