GAME WORKS WHEN TESTED IN BROWSER-SYNC, BUT NOT THE MV PLAYTESTER
Posts
Pages:
1
I've been testing a plugin with BrowserSync. What I have so far works as I intended.
But when I test it using MV's built-in playtest functionality, things get all wonky. Here are the errors.
It seems that for some reason, RMMV doesn't recognize the "use strict" clauses I put in that allow me to use ES5 classes. Here's a code snippet to help illustrate this.
I'm using RMMV version 1.5.1. I'd appreciate help understanding this.
But when I test it using MV's built-in playtest functionality, things get all wonky. Here are the errors.
It seems that for some reason, RMMV doesn't recognize the "use strict" clauses I put in that allow me to use ES5 classes. Here's a code snippet to help illustrate this.
I'm using RMMV version 1.5.1. I'd appreciate help understanding this.
Thanks to someone by the name of MinusGix, I found the solution.
Turns out that MV's "class" keyword support is incomplete; fields need to be initialized either in the class constructor, or just outside the class. Getters and setters for those fields are still fair game.
A future MV update might make it so you can have fields just straight-up in the class declarations, but until then, that's what we have to deal with.
Turns out that MV's "class" keyword support is incomplete; fields need to be initialized either in the class constructor, or just outside the class. Getters and setters for those fields are still fair game.
A future MV update might make it so you can have fields just straight-up in the class declarations, but until then, that's what we have to deal with.
Thank you for sharing your solution!
Pages:
1