I'm having some trouble with the Random Number expression.
Consider this minimal example; the desired functionality is that every time a block is broken, a random integer between 1 and 9 is chosen, and that many diamonds are dropped.
This code returns the error
Can't understand this condition/effect: drop {_diamondsToDrop} diamonds
On the other hand, replacing this last line with broadcast "%{_diamondsToDrop}%" broadcasts the integer (as expected), and replacing it instead with drop 1 diamond drops one diamond upon break (also as expected).
What is wrong with the code, and how can one achieve this functionality?
Consider this minimal example; the desired functionality is that every time a block is broken, a random integer between 1 and 9 is chosen, and that many diamonds are dropped.
Code:
on block break:
set {_diamondsToDrop} to random integer between 1 and 9
drop {_diamondsToDrop} diamonds
This code returns the error
Can't understand this condition/effect: drop {_diamondsToDrop} diamonds
On the other hand, replacing this last line with broadcast "%{_diamondsToDrop}%" broadcasts the integer (as expected), and replacing it instead with drop 1 diamond drops one diamond upon break (also as expected).
What is wrong with the code, and how can one achieve this functionality?
Last edited: