Jump to content

Recommended Posts

Posted
on load:
    set {level.%player%} to 1

on first join:
    set {level.%player%} to 1

on respawn:
    send "%{level.%player%}%" to player
    send "test" to player
    if {level.%player%} is 1:
        send "test" to player
        send "%{level.%player%}%" to player
        set player's helmet to chainmail helmet of protection 2

so I'm trying to make a skript for a random kit pvp server, This skript is supposed to give a number when the player first joins and then when you increase the number the kits get better. But I haven't gotten to the kits getting upgraded part because for some reason this doesn't work. so basically when I set the variable it just say's it's unset whenever I send it to my player. no errors here's what the prints send  image.png.c1b919b76b194e81018228fe11501b74.png

Please help me fix this!

  • 4 weeks later...
Posted
on join if {level.%player%} is not set:
	set {level.%player%} to 1
on first join:
	set {level.%player%} to 1

i think you may need to add this instead of the first join and on load parts, that should help hopefully

 

Posted

Instead of creating a new variable for each player, create a list. (so instead of using {level.%player%}, use {level::%player%}. This will work better and be beneficial in the long run).

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

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