I am having an issue getting a formula that uses Rand in a healing spell to work. I have no issues with Rand in any other formula. Only this one
The output txt file says
"unexpected ')', expecting $end"
but nothing could be further from the truth! I have used "(rand(5) + 1))" in MANY formulas and it never says unexpected ) in any of those formulas.
Basically I want the formula to take the target's maximum HP, divide it by a random number 1 - 5, and then multiply the result by 1.5 and the output of that formula is how much health is recovered to the target.
This formula should work but it is failing for seemingly no reason whatsoever
Does anybody know what the problem could be?
The output txt file says
Code:
(eval):1:in `eval': (eval):1: syntax error, unexpected ')', expecting $end
b.mhp / (rand(5) + 1)) * 1.5
^, SyntaxError
from (eval):1:in `eval'
from Game_Battler:351:in `make_damage_value'
from Game_Battler:507:in `item_apply'
from Yanfly cooldown:796:in `item_apply'
from Scene_Battle:605:in `apply_item_effects'
from Scene_Battle:597:in `invoke_item'
from Scene_Battle:586:in `block (2 levels) in use_item'
from Scene_Battle:586:in `times'
from Scene_Battle:586:in `block in use_item'
from Scene_Battle:586:in `each'
from Scene_Battle:586:in `use_item'
from Scene_Battle:573:in `execute_action'
from Scene_Battle:550:in `process_action'
from Scene_Battle:48:in `update'
from Scene_Base:14:in `main'
from SceneManager:22:in `run'
from Mapshot:986:in `run'
from Screenshot Take:167:in `run'
from Backtrace:10:in `block in <main>'
"unexpected ')', expecting $end"
but nothing could be further from the truth! I have used "(rand(5) + 1))" in MANY formulas and it never says unexpected ) in any of those formulas.
Basically I want the formula to take the target's maximum HP, divide it by a random number 1 - 5, and then multiply the result by 1.5 and the output of that formula is how much health is recovered to the target.
This formula should work but it is failing for seemingly no reason whatsoever
Does anybody know what the problem could be?