ezylang / EvalEx

EvalEx is a handy expression evaluator for Java, that allows to evaluate simple mathematical and boolean expressions.
https://ezylang.github.io/EvalEx/
Apache License 2.0
979 stars 266 forks source link

How to solve float number problems with math placeholder. #241

Closed johnsoncui02 closed 4 years ago

johnsoncui02 commented 4 years ago

This command will help me check the number of times players completed the quest. It works well when the player completes quests in even numbers, but when it's odd numbers it would only give me 1 prismarinecrystals. Is there a way where I can make it not only give me 1 for every odd number?

cmi give {player} prismarinecrystals {math:(%questcreator_completions_zombie_expert%/2)+1}

RobertZenz commented 4 years ago

Could it be that you took a wrong turn somewhere? This is about a mathematical expresseion parser and evaluator called EvalEx...not sure what you got there, but doesn't look like an expression EvalEx would parse.

Oh, I know, it's this Minecraft-thingy, right? Yeah, we don't do that, that's not this project.