Jump to content

Skript of Mana, why will it detect the event?


THE_HAPPIER_CYL

Recommended Posts

I use this code but it wont work...

on first join:
    set {maxmana.%player%} to 30
    set {mana.%player%} to {maxmana.%player%}

------------------------Down there it says error------------------------

every 50 ticks:
    loop all players:
        if {mana.%loop-player%} is greater than {maxmana.%player%}:
            set {mana.%player%} to {maxmana.%player%}
        else:
            add 3 to {mana.%loop-player%}

Link to comment
Share on other sites

You are using player inside of a periodical event. There is no player in that even. Change it to loop-player like you used in the other parts. 

Also you should use list variables and uuid for variables. So in this case, it would be {mana::%loop-player's uuid%}. This is so that the variable won't reset for someone if they change their name and you can manage list variables easier. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 - 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - 12/20/22

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...