Mojira Archive
MC-264626

Execute unless function ignores non-zero return value in function

When running a command like

execute unless function skills:chances/1in3 run scoreboard players add @s skill_carpentry 1

from inside a function the return value of the tested function is not checked. The command will be executed whether it is 0 or not. Only success is used.
The called function (skills:chances/1in3) is:

return run random roll 0..2

When this command is run in chat, it works as expected and the command is only run if the returned value is 0.

Awaiting Response

David Schulte

2023-08-04, 12:08 PM

2024-01-19, 05:21 AM

2024-01-19, 05:21 AM

2

5

Unconfirmed

(Unassigned)

23w31a

-