• Hey! Register here to create your account, engage with the community, and talk about what is new!

Issue regarding player specific variables

LunarNox

New member
Joined
Sep 23, 2023
Messages
3
Reaction score
0
I am attempting to give each player who joins a specific amount of power. Attempts at doing so are failing for no visible reason, the variable just fails to exist. I define the variable as %defaultpower in the player join event, because as soon as they join they need an action bar to pop up telling them their power. is their a better way to be doing this.
 

Jeremaster

Owner
Owner
Joined
Aug 16, 2020
Messages
89
Reaction score
128
Where are you setting the value of %defaultpower? You'll need to set %defaultpower = something before displaying it.

While it shouldn't affect the functionality, it is conventional to put a space in the name: "%default power".
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,254
Reaction score
351
it is conventional to put a space in the name
adding a space also allows you to purge variables better for people that have similar names (e.g. LunarNox and LunarNox1, so you can varpurge only LunarNox without touching LunarNox1)
 

LunarNox

New member
Joined
Sep 23, 2023
Messages
3
Reaction score
0
Where are you setting the value of %defaultpower? You'll need to set %defaultpower = something before displaying it.

While it shouldn't affect the functionality, it is conventional to put a space in the name: "%default power".
As stated in the post, I set it in the player join event. I originally had it set to 10, but plan on setting it to 100.
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,254
Reaction score
351
As stated in the post, I set it in the player join event. I originally had it set to 10, but plan on setting it to 100.
is your variable a Game variable or a Local/Line variable? make sure it's Game variable (you can see what type of variable you have in its lore)

You should also check all your variables while you or someone else is in Play mode by running /p vars (/plot vars)
 
Top Bottom