I feel bad, it feels everytime I comeback to this forum I have a weird problem, well its what happens when my brain refuses to lear how "code" actually works XD.
So I'm trying to do this. so I'm using
Yanfly - Toxic (MV Plugin Tips & Tricks) and I managed to create the HP-reducing effect with no problem, now I tought, how about I also make also an MP drain one, when I went ahead and test it however I got this error.
I said, huh, maybe the ST0RM plug-in is causing issues... so I turn it off saved and test again.
So the error is still there, I tried testing the HP one again, and that one works fine. So this is the original Toxic code
JavaScript:
<Custom Regenerate Effect>
var n = this._toxicCounter / 8;
var value = Math.floor(n * user.mhp * -1);
user.gainHp(value);
this._toxicCounter += 1;
</Custom Regenerate Effect>
And this is what I was using to just test the MP reduction
JavaScript:
<Custom Regenerate Effect>
var n = this._toxicCounter / 8;
var value = Math.floor(n * user.mmp * -1);
user.gainMp(value);
this._toxicCounter += 1;
</Custom Regenerate Effect>
So... any idea what's going on?
And thanks in advance to anyone willing to help, or bounce ideas.
Edit: BTW normal MP negative regeneration works fine, I can set it up to -10% and that works.
Edit: Solved due to me not being careful enough to check if I was actually applying the counter,
@Robro33 is correct, it was trying to divide by 0 due to not applying the toxic counter on the same state.