1. Do you have YEP Damage Core installed?
2. You say this happens after you execute a skill, show us that skill's damage formula
Is this an error that happens when you use new plugins on an old project?
What version of MV are you using? You can find that in Help About or somewhere like that, in the menu.
What version are your core files? You can find out by opening the project folder, going into the js subfolder, and opening the rpg_core.js file - the core file version should be on the first few lines. If there's no version shown there, it means you have 1.0.0
even if there is no new plugin, can you still give us a screenshot of your plugin manager with all plugins listed?
Sometimes errors like this are caused by incompatible plugins or plugins that are in the wrong order - and sometimes such errors don't get triggered until a playthrough gets to a certain data combination that disturbs the plugins.
EDIT:
And please try adding an ;0 to your damage formula. The engine expects a return number to be processed as the result of any damage formula, only using javascript code without returns can cause problems, so force a zero as the last number of the damage formula.
Put the semi-colon before the zero, not after.
Yay! It finally works without crashing. Now if only I can regulate the TP drained to not take more than what the target has.
r=0.5*b.tp would be 50% of current TP for example
for comparison you'll need an if structure, but I don't have the correct syntax ready as I haven't done much with javascript.
something like
if r<50 then drain r else drain 50
sorry.
a.gainTp and b.gainTp, not .gainTP
OK, it works finally! Sucks that the coding is case sensitive.