Carry variable to other variable

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

Vane

Member
May 27, 2019
11
0
1
Code:
function checkFor_dataVariables(p: player):
    set {new_profile_variables::reputation} to 1
    set {new_profile_variables::tokens} to 1
    set {new_profile_variables::test3} to 2
    
    loop {profile::%{_p}'s uuid%::*}:
        loop {new_profile_variables::*}:
            if {profile::%{_p}'s uuid%::%{loop-index-2}%} isn't set:
                #doesn't reach here
                broadcast "here"
                set {profile::%{_p}'s uuid%::%{loop-index-2}%} to loop-value-2


Basically, I want for example, if test3 isn't found in profile:: for it to carry over there
 
Did you set {profile::%{_p}'s uuid%::*} somewhere else? If you didn't than there is nothing to loop in line 6.
 
Did you set {profile::%{_p}'s uuid%::*} somewhere else? If you didn't than there is nothing to loop in line 6.
I already have a few stuff set to myself on there, so yeah, it is set I guess. However for {profile::%{_p}'s uuid%::test3} for example, its not set.
 
Status
Not open for further replies.