Hi, RPG Maker community. Again. For the second time in less than a week. n_n' /
The move's description is as follows:
The user inflicts damage on himself in order to deal
massive Dark damage to the enemy.
The move's formula is as follows:
c=(a.atk*6 + a.mat*6) - b.def * 3; a.hp-=(a.hp*0.25).to_i;c.
I hope it's not something embarrassingly simple like my last thread topic.
Okay, complex problem! Maybe. Syntax error in skill formula.
● ARCHIVED · READ-ONLY
-
-
That formula is needlessly complex, you can write it easier in the following way:
Code:Without seeing the error message I don't know what the original error was, but it might be missing spaces (some spaces are needed for the interpreter to know what goes where).a.hp -= a.hp*0.25; a.atk * 6 + a.mat * 6 - b.def * 3 -
Is that dot at the end of the line part of your formula?
Sometimes it helps just to erase the formula and rewrite it. -
Thank you, that fixed it. I'm not very familiar with the syntax that the formula box uses.That formula is needlessly complex, you can write it easier in the following way:
a.hp -= a.hp*0.25; a.atk * 6 + a.mat * 6 - b.def * 3Without seeing the error message I don't know what the original error was, but it might be missing spaces (some spaces are needed for the interpreter to know what goes where).
It is, yes. I use variations of this formula for other skills, but this was the only one giving me a syntax error.Is that dot at the end of the line part of your formula?
Sometimes it helps just to erase the formula and rewrite it.