Solved Problem with function if

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

Status
Not open for further replies.

wCrazy_

Member
Jan 7, 2021
15
0
1
24
Version of server: Spigot-1.8.8
Version of skript: v2.1.2

Hi how can i fix this:

Code:
every 1 second:
    set {_unix-time.reward.all} to convert date now to unix date
    send "%{_unix-time.reward.all}%" to console
    loop all players:
        loop {Rewards.%loop-player%::*}:
            send "%loop-player%: %loop-value%" to console
            if {Rewards.%loop-player%::%loop-value%} is {_unix-time.reward.all}: #this not working
                set {canClaim.reward.%loop-player%.%loop-value%} to true
                send "&fPlayer &c%loop-player% &fcan claim &c%loop-value% &freward. ok worked every 1 sec" to console
[doublepost=1635270625,1635270467][/doublepost]and "{Rewards.%loop-player%::%loop-value%}" is:

Code:
set {_unix-time2.reward.%player%} to {_time.reward.%player%.%{claim.reward.%player%}%} + {_unix-time.reward.%player%.%{claim.reward.%player%}%}
set {Rewards.%player%::%{claim.reward.%player%}%} to {_unix-time2.reward.%player%}
 
I found bug.

How can i set {canClaim.reward.%loop-player%.%loop-value%} to true


Code:
            if loop-value is {_unix-time.reward.all}:
                set {canClaim.reward.%loop-player%.%loop-value%} to true #this not work now
                send "&fPlayer &c%loop-player% &fcan claim &c%loop-value% &freward. ok worked every 1 sec" to console
                stop
[doublepost=1635273561,1635271750][/doublepost]loop-value is unixcode
 
Status
Not open for further replies.