These errors are because of the perks modifications. it's possible the perk is not avaible so then it can't find the value. If you use the getattribute it will make sure not errors are generated. Also make sure you use "defence" instead of "defense". Just check the names with the perks_init.c file
same goes for this error
The first time it doesn't recognise the value so use getattribute to get it. But for now it's (PChar.TrainingFight.count) also not set anywhere as far as I can see. so I think you forgot that.
These errors I'm not sure why they are generated, this could be storyline specific. Could someone try it in another storyline to check? And what stroyline where you playing davyjack?
TrainingFight.count is an artifact from MAXIMUS' original code that I forgot to fully remove in one place...I don't use it anymore but there is a conditional statement that calls it. I will remove and do some more testing and resubmit the change. Also, I didn't realize there were logs that track errors...boy,that is going to make troubleshooting a lot easier from now on.