Please help me out. I have been doing just this for hours. I am learning RMMV plugin development. Here is my code:
I get the error "unexpected end of json input" at the Json.parse code.
/*:
*@author Yevgeniy Kizhner
*@plugindesc This is a testing plugin.
*@param Cus
*@type struct<Custom>
*@help Just testing things out!
*/
/*~struct~Custom:
*@param Custom Energy
*@type boolean
*@default false
*@param Custom Energy Name
*@type text
*/
var params = PluginManager.parameters("MyPlugin")["Cus"];
console.log(params);
console.log(params["Custom Energy Name"]);
//console.log(JSON.parse(params));
var val = JSON.parse(params);
console.log(val);
console.log(val['Custom Energy Name']);
var Win = Window_Gold.prototype.refresh;
Window_Gold.prototype.refresh = function() {
Win.apply(this, arguments);
var energy1 = JSON.parse(params);
var energy2 = energy1["Custom Energy Name"];
this.drawText(energy2, 2, 0, 20, 'left');
*@author Yevgeniy Kizhner
*@plugindesc This is a testing plugin.
*@param Cus
*@type struct<Custom>
*@help Just testing things out!
*/
/*~struct~Custom:
*@param Custom Energy
*@type boolean
*@default false
*@param Custom Energy Name
*@type text
*/
var params = PluginManager.parameters("MyPlugin")["Cus"];
console.log(params);
console.log(params["Custom Energy Name"]);
//console.log(JSON.parse(params));
var val = JSON.parse(params);
console.log(val);
console.log(val['Custom Energy Name']);
var Win = Window_Gold.prototype.refresh;
Window_Gold.prototype.refresh = function() {
Win.apply(this, arguments);
var energy1 = JSON.parse(params);
var energy2 = energy1["Custom Energy Name"];
this.drawText(energy2, 2, 0, 20, 'left');
I get the error "unexpected end of json input" at the Json.parse code.