Started by ImNotFun on Mon, 09/07/2020 - 09:57
Topic category: Help with MCreator software
So i'm trying to make a magic-type weapon that will use and only work if the player has above a certain amount of exp.
This is what i've got so far, but of course it doesn't work. The exact error code is Procedure that uses return value must use a valid return block. I've tried the other two return blocks but neither of them connect with the true block
The error is simple. The return statement should be outside the statement. Make a logic variable set that to true inside the if statement.
Add an else statement setting that to false.
Return the logic variable.
If I help you please say thank you because, after I help, most people just leave.
Another way to do this is to place another return statement outside of the if statement. Here's how it works: what your code does is it returns true if the target's xp is greater than 5, but it forgets to return false if not. You simply need to add a return statement that is set to false after the if statement, so that the program can figure out what to do if the xp level is less than 5.
hey i know this is old but, how did you do that "get xp level of"? trying to make a procedure that if you have exp levels, it will take away 1 xp level and give you a piece of diamond. if you don't, it will give nothing
@DestroyerOFC3 Code block procedure builder has search bar at the top in newer versions you can use. Otherwise it should be in the 'Player procedures' tab