MV The provided value 'undefined' is not a valid enum value of type CanvasTextAlign.

Playtesting is a nightmare ever since I updated MV's nwjs to the latest version (0.110.1 sdk). Everytime I scroll in my inventory, it would spam a barrage of warning messages and lag my game as a result.
1776258580181.png

This doesn't even happen in my previous nwjs version. (0.90.0) :c
I wish there was a way to at least rid of the warning spam so I could check the console lag-free...
Assuming you did not tamper with the rpg_core file, all this message is saying is that "textAlign" was not passed when drawing a text, which isn't uncommon because the default value is "left" and developers usually skip this redundant information.

Anyway, make a tiny plugin with any name, put it to the top, or use any other way to include this code into your game:

Code:
(function() {

const _Bitmap_drawText = Bitmap.prototype.drawText;
Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
  align = align || 'left';
  
  _Bitmap_drawText.call(this, text, x, y, maxWidth, lineHeight, align);
}

})()
Assuming you did not tamper with the rpg_core file, all this message is saying is that "textAlign" was not passed when drawing a text, which isn't uncommon because the default value is "left" and developers usually skip this redundant information.

Anyway, make a tiny plugin with any name, put it to the top, or use any other way to include this code into your game:

Code:
(function() {

const _Bitmap_drawText = Bitmap.prototype.drawText;
Bitmap.prototype.drawText = function(text, x, y, maxWidth, lineHeight, align) {
  align = align || 'left';
 
  _Bitmap_drawText.call(this, text, x, y, maxWidth, lineHeight, align);
}

})()
tysm, it doesn't spam the warnings anymore c:

Original thread: https://forums.rpgmakerweb.com/threads/the-provided-value-undefined-is-not-a-valid-enum-value-of-type-canvastextalign.183274/