Hey there game makers!
So I I'm working on a plugin that contains an array, long story short the plugin has an array that can be changed with params and if the array contains another param it should do something and something else if it doesn't.
My problem is that it's doing what it should if false.
Here's my summerized code
My problem is that it's only doing action 2 whether or not the array contains the specified string.
Can anyone help?
So I I'm working on a plugin that contains an array, long story short the plugin has an array that can be changed with params and if the array contains another param it should do something and something else if it doesn't.
My problem is that it's doing what it should if false.
Here's my summerized code
JavaScript:
*@param 1
*@default String1
*
*@param 2
*@default String1, String2, String3, String4
*
var Imported = Imported || {};
Imported.PluginName = true;
var BDZparam = BDZparam || {};
BDZparam.parameters = PluginManager.parameters('PluginName');
BDZparam.Default = String(BDZ.parameters['Param 1'] || "String1");
BDZparam.Array = Object(BDZ.parameters['Param 2'] || "String2", "String2", "String3", "String4");
const myArray = [BDZparam.Array];
var arrayNo = myArray.length;
if(myarray.includes(String(BDZparam.Default))) {
action 1
} else {
action 2
}
My problem is that it's only doing action 2 whether or not the array contains the specified string.
Can anyone help?