Changing `ptr` to `ptre` is usually one line change but I try keep everything read only, main reason is that I can reason what scripts can and what can't do.
If I change it to writable version should I prepare code to handle instant death of unit after this script run? Because of this I leaving this as read only.
One thing I could think is give access only to `tag` object as writable because game engine do not relay on this values.
Btw maybe there is other place where you logic could be placed? Right now after mission you can access `battleUnit.Exp.*` where all stats grain are stored.
For function, you misspelled misspelled function too

, I will fix it right now.
For script, right, I do not propagate it there, this will be fix too.