Hello...I set up a currency system on our realm it was established on 1.12 and with the new update I can no longer test for the amount of money a player has...before if you didn't have enough money you couldn't buy the item...that no longer works it will let you buy it even if you don't have any money...will take your score into the negatives. I have fixed the selling of items but not the buying...any help would be appreciated
andreistoleru03 You literally replied my system but a broken version of it.
Your @p[scores={Money=500}] is broken in 2 ways.
first of all, the player needs exactly 500 money, if he has anything else like 501 502 or anything, it will not go through.
Secondly, @p looks for the closest player. @p[scores={Money=500}] looks for the closest player who has 500 money.
See the problem? if the nearest person has under 500 money, it does not match, so it looks for another player who does have 500 money.
That is why we need to /execute as @p run for this to work. then as we execute as the closest player, we check if the current entity (@s) has enough money and also allow amounts above 500.
Hello...I set up a currency system on our realm it was established on 1.12 and with the new update I can no longer test for the amount of money a player has...before if you didn't have enough money you couldn't buy the item...that no longer works it will let you buy it even if you don't have any money...will take your score into the negatives. I have fixed the selling of items but not the buying...any help would be appreciated
Could you give us your current commands?
Also, this might help you: You can now detect scores with selectors, for example @a[scores={foo=1,bar=1..5}]
And you select number ranges with
level=10 is level 10
level=10..12 is level 10, 11 or 12
level=5.. is anything level 5 or above
level=..15 is anything level 15 or below
Hello... yes here are the commands
1st command block says... scoreboard players test @p Money 500
2nd command block says...scoreboard players remove @p Money 500
3rd command block says...give @p minecraft:redstone_ore 64
here is a screen of the setup Thank You for your help!!
the redstone torch is on wood log that has a button on you push for the buying of the item
Ok, break it all.
So 2 command blocks. First one is normal, but a second one is after it and it's chain, always active and condictional
1: execute as @p run scoreboard players remove @s[scores={Money=500..}] Money 500
2. give @p redstone_ore 64
Also make sure that the first command block is facing the other.
This was written by hand at 3 am, there might be a mistake. Tell me if it works.
This is assuming there is a button or some other input device. I aint sure if I fully understand your circuit but it might be that im tired.
ok thank you I will try it
hello...unless I did something wrong ...no that wouldn't work..thank you though..any other help is appreciated
andreistoleru03 You literally replied my system but a broken version of it.
Your @p[scores={Money=500}] is broken in 2 ways.
first of all, the player needs exactly 500 money, if he has anything else like 501 502 or anything, it will not go through.
Secondly, @p looks for the closest player. @p[scores={Money=500}] looks for the closest player who has 500 money.
See the problem? if the nearest person has under 500 money, it does not match, so it looks for another player who does have 500 money.
That is why we need to /execute as @p run for this to work. then as we execute as the closest player, we check if the current entity (@s) has enough money and also allow amounts above 500.
Simple enough
Could you give me a picture of your current setup