What am i missing? - Default params in plugins

Consider for a moment the following example:
 

/*: * @plugindesc Allows you to add a new currency or set of currencies to the game * such currencies can include things like "clay pot" or "silver coin" they are then * used in shops. * @author Adam Balan (AKA: DarknessFalls) * * @param ---Currency Translation--- * * @param Label For Menu * @desc The name the player will see in the menu. * Default: Currency * @default Currency * * @param Currently Have * @desc the label for "currently have" in the list of currencies. * Default: Currently have: * @default Currently have: */ 
 
Now the way I have been getting the user input for plugin params is:
 

var FlareCurrencyPluginParamters = PluginManager.parameters('Flare-Currency');When I console.log the object, I get information back, things seem to relatively work until I go and do this:

[IMG]http://i.imgur.com/iuqTVVa.png[/IMG]

Now this would be fine. Accept when I run the game I have the default set at, as we see from the above, Currency.

I thought default meant .... well ....default. As in, if you have nothing, we use what you said is default. Accept when I run the game and have Label For Menu set to Currency, great the object shows text, how ever when I delete the text and run the game the Label For Menu is ""

Uh .... This seems wrong, especially when default is set??? This is a bug across all my scripts.

Any idea, maybe the comments are wrong? I dunno ... 
That isn't a bug. the default value is taken hen you initially install a plugin so that parameter values will have a value. If the developer changes these values, then they will be used as the developer made them. How could we be sure that an empty parameter wouldn't be what a developer intended? By replacing empty parameters with the default value, we could never have empty parameters. If you want to be able to have them empty and then set the default value, you'll have to do something like

Code:
param = param || default
You don't get the default, because you explicitly set the parameter to an empty string, overwriting the default. The default value only means, what will be filled in the box, when you freshly add the plugin, before changing any parameter.
You don't get the default, because you explicitly set the parameter to an empty string, overwriting the default. The default value only means, what will be filled in the box, when you freshly add the plugin, before changing any parameter.
oh so this isnt a bug? 

That isn't a bug. the default value is taken hen you initially install a plugin so that parameter values will have a value. If the developer changes these values, then they will be used as the developer made them. How could we be sure that an empty parameter wouldn't be what a developer intended? By replacing empty parameters with the default value, we could never have empty parameters. If you want to be able to have them empty and then set the default value, you'll have to do something like

param = param || default
this makes sense, I was testing my currencies script and I thought that @default meant "if nothing or empty string then use @default"
Personally, i often find myself using empty parameters as "disable this". So, for example, my minimap plugin adds 2 new entries to the option menu to modify the scale and opacity of the map. The labels for these entries can be set via plugin parameter and and empty string causes the entries to not be added.
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.


at OP's request


(and I hit the Mark Solved button on the post that answered the question - note, this is the one that appears at the top of the thread now when you go to view it)

Original thread: https://forums.rpgmakerweb.com/threads/what-am-i-missing-default-params-in-plugins.53337/