Issue with a.gainExp()

Since i didn't knew how to use it i've decided to add in every skill i had cuz i wanted all of them to give EXP.
But then i've noticed that i couldn't add it to a formula if the skill had no damage type and decided to make it to heal HP and set the heal to zero.
Then i got this error and the worst is that if it was supposed to recover MP i'd get silenced.
Enemies can't deal damage if the formula has a.gainExp as well.

Haven't tried to use a.gainExp on notes yet.

View attachment 39206
The issue with enemies is pretty obvious. Enemies don't have exp, so, when you try to give them exp, it will cause an error, the damage formula prevents the game from crashing and makes it cause 0 damage.


Basically adding anything that is exclusive to actor for enemies (level, exp, equips) on the damage formula, will cause that.


About the MP recover, did you update your project files to version 1.2.0? This issue happened on the previous versions and was supposed to be fixed.
I did and the issue is seems that they didn't fixed it yet.


But would the a.gainExp work if i place it in the note box?
it doesn't matter where it is placed.


If the code will be processed by a the enemy, it will look at the enemy object and will not find the code you're using.
Yeah, i've figured that when they where dealing zero damage, so i made a copy of each skill and removed the gainExp from their formulas.

I was worried about this since i wanted even items to give EXP.
I think this will ease your trouble. 


Battle Action EXP
thx, but this is not compatible with 

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-a-gainexp.62816/