- Joined
- Jan 17, 2014
- Messages
- 67
- Reaction score
- 30
- First Language
- Spanish
- Primarily Uses
- RMMV
[Solved]
I tried to make a script for a specific effect for skills with a specific notetag (I still don't know how to name it).
I tested, and if I activate the skill on the map, it works just fine, but in battle, I get "Cannot read property 'length' of null" error in the "if (match.lenght>1)" line.
What is wrong there?
I tried to make a script for a specific effect for skills with a specific notetag (I still don't know how to name it).
I tested, and if I activate the skill on the map, it works just fine, but in battle, I get "Cannot read property 'length' of null" error in the "if (match.lenght>1)" line.
Code:
Game_BattlerBase.prototype.paySkillCost = function(skill)
{
this._mp -= this.skillMpCost(skill);
this._tp -= this.skillTpCost(skill);
var match = skill.note.match(/<test:\s*([0-9]+)\s*([0-9]+)\s*(\D*)s*>/i);
if (match.length>1)
Last edited:
