#if statements not working
1 messages · Page 1 of 1 (latest)
let me get paste bin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
This code here is supposed to set the player to survival and teleport then to a bed. But if the player is in survival mode it should subtract 100 levels and if the player is in creative mode it shouldnt subtract anything. The if statements are being weird and being run without any of the requirements being met. any help?
that compiles??/
Also get xp will never be 100
It represents the completion progress of a level, from 0-1
You probably want getTotalExperience
Getting total experience will get lifetime. That’s not what I want
Would get levels be better?
Oh yeah you gotta do weird math to get the raw total
i think i fixed those issues, it does not work though. If the player is in survival it still executes as if in creative.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
i didnt paste it but, player is defined in the line above the top as command sender
nvm
I think i fixed!