I broke my first plugin :(

Hey Friends was trying to be a kool kid and make a plugin that could alter the way variance is handled in RPG maker MV, it was working when everything was hard coded then when i tired to add the parameters so that a few values could be changed without having to open up the file i somehow ruined everything and now it doesn't work and  i haven't been able to figure out why the parameter no longer is an int?

// ------------------------------------------------// Lucky_Variance.js// ------------------------------------------------/*:** @plugindesc Allow LUK to Affect and off Stats to effect variance of skills* @author Dark Condiant** @param Variance_Adjustment* @desc The amount added or subtracted from the variance% before apply it to damage default: (this.subject().luk/5)*2* @default (this.subject().luk/5)*2** @param Variance_Ceiling* @desc Allow Stat to increase damage beyond the variance %?* @default false*/var alias_Variance_Handler = Game_Action.prototype.applyVariance;Game_Action.prototype.applyVariance = function (damage, variance) { alias_Variance_Handler.call(damage, variance); console.log(variance); var parameters = PluginManager.parameters('Lucky_Variance'); var Evaltool = Number(parameters['Variance_Adjustment'] || (this.subject().luk/5)*2); var noceiling = String(parameters['Variance_Ceiling'] || "false"); console.log(Evaltool); console.log((this.subject().luk/5)*2);var varint = Math.randomInt(variance* 2); var finder = 0; if (varint <= (varint / 2)+1){ finder+=varint;} else { finder-=varint; finder+=variance; } if(noceiling=="false"){ if(finder>variance) { finder=variance}}; finder += Evaltool; console.log(finder); var fixer =finder / 100; var pumpfix = damage * fixer; damage += pumpfix; return damage;};its Evaltool its somehow broken and doesn't return and int you can ignore the console.log thing as i was just using it to print out the values as the code went along.

is someone can point me in the right direction you would rock for helping me finish my first plugin.

Here is a Control project to assist in isolating the issue, there are only 2 plugins present are mine and the one that makes the console.log work and i was able to recreate the issue before i put it back into the test project. i got the filesize to >80mb. Here is the link https://drive.google.com/file/d/0BzObn5NZ4KmtRUZSR2FETGJmZ1U/view?usp=sharing

Thanks in advance to anyone who has time to help me
if(noceiling="false")

The = symbol should be == in there. That's probably not your problem but it's an error regardless.
Does the file named Lucky_Variance.js ? Since the way you grab plugin parameter is not allowing you to change the file name. Does the console.log for plugin parameter show right value?
if(noceiling="false")

The = symbol should be == in there. That's probably not your problem but it's an error regardless.
oh snap thxs too bad that didnt fix it but thxs for reminding me of proper snytax

Does the file named Lucky_Variance.js ? Since the way you grab plugin parameter is not allowing you to change the file name. Does the console.log for plugin parameter show right value?
yes that is the file name.

Also how do i change it so the file named does not matter?

Also as for what the console.log is returning

Line 21:  20  (Which is the correct variance of the skill im using, aka the regular attack skill.

Line 26: nan (which is the problem and doesnt make any sense to me because of the next line)

Line 27: 200 (line 26 and 27 should have the same value why are they different was the variable made wrong?), also yes the actor does have 200 luk

Line 46: nan (this makes sense at least because evaltool is broken)
Also how do i change it so the file named does not matter?
Follow the first link in my signature ^^
oh snap thxs too bad that didnt fix it but thxs for reminding me of proper snytax

yes that is the file name.

Also how do i change it so the file named does not matter?

Also as for what the console.log is returning

Line 21:  20  (Which is the correct variance of the skill im using, aka the regular attack skill.

Line 26: nan (which is the problem and doesnt make any sense to me because of the next line)

Line 27: 200 (line 26 and 27 should have the same value why are they different was the variable made wrong?), also yes the actor does have 200 luk

Line 46: nan (this makes sense at least because evaltool is broken)
i also use lavra method... it allow us to change the filename of the plugin... simple yet effective. 😀 .
Follow the first link in my signature ^^
Ahhh ok thanks once I get it to work I will definitely try to do it this way and hopefully not break it again.

Edit: updated original post to provide a Demo project
Have u tried using eval() instead of Number()

?
Have u tried using eval() instead of Number()

?
Wow.....i cant even just wow...

Thxs so much your awesome this was the issue the whole time

Original thread: https://forums.rpgmakerweb.com/threads/i-broke-my-first-plugin.53419/