Plugin parameters: Struct "problem" again

Status
Not open for further replies.

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,710
Reaction score
1,127
First Language
Portuguese - Br
Primarily Uses
RMMZ
[EDIT] I got it!
It was a typo ^^'''

Instead of this:
extinguisher: JSON.parse(Eli.Structure.Param.myStructure["BackgroundOnOff"])

It has to be:
extinguisher: JSON.parse(Eli.Structure.Parameters.myStructure["BackgroundOnOff"])


Hi people!
A while ago I have asked here how can I properly set a Struct parameter. People answer me nicely and provide me a lot of solutions, that in the time, I ended using.

But, now, I have liked the "old" way with more extensive work.
I manage to make the struct work.

But I'm having a problem, that I can't say if it is something that I made wrong or it is just how Visual Studio Code handles things.

I want to be capable of this to access my properties in visual studio code(In this example I manage to do it):

But in this example, it's not working, don't know why.

What I'm missing?


[EDIT]The whole "plugin" here:
JavaScript:
/*:
@plugindesc v1.0 -
@author Eliaquim or Rakuen Zero

@help
Made and tested with Rpg Maker Mv 1.6.2.
Always have a backup from your project!

@param MyStructure
@desc This is a structure
@default {}
@type struct<Structure1>

*/

/*~struct~Structure1:

@param BackgroundOnOff
@type boolean
@desc
@default true

*/

"use strict"

var Imported = Imported || {};
Imported.Eli_Structure = true;

var Eli = Eli || {};
Eli.Structure = Eli.Structure || {};

Eli.Structure.Parameters = PluginManager.parameters('Eli_Structure');
Eli.Structure.Param = Eli.Structure.Param || {};

    Eli.Structure.Param = {
        myStructure: JSON.parse(Eli.Structure.Parameters["MyStructure"])
    };

    Eli.Structure.Param.myStructure = {
        extinguisher: JSON.parse(Eli.Structure.Param.myStructure["BackgroundOnOff"])
    };
 
Last edited:

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,685
First Language
English
Primarily Uses
RMMZ

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,048
Messages
1,018,543
Members
137,834
Latest member
EverNoir
Top