RMMV JavaScript Error with Yanfly Skill Core

Hello, I'm facing a problem with Javascript. Using this plugin: http://yanfly.moe/2015/10/13/yep-8-skill-core/ , I try to set requirements for when a skill can be used or not. However, it produces an error. Here is what I've input and the error message itself.


Error Code: http://imgur.com/a/9DHXJ


And what I've input into the notebox for my 2 skills.


Skill 1 : 


<Custom Requirement>
if $gameVariables.value(16) < 3 && $gameVariables.value(21) < 3 {
value = true;
} else {
value = false;
}
</Custom Requirement>




Skill 2 :


<Custom Requirement>
if $gameVariables.value(16) != 0 {
value = true;
} else {
value = false;
}
</Custom Requirement>




Hope you can give me some insight! Thanks for help!
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
Not sure, as I don't use the plugin, but try putting brackets around your conditions:


if ($gameVariables.value(16) < 3 && $gameVariables.value(21) < 3) {


instead of


if $gameVariables.value(16) < 3 && $gameVariables.value(21) < 3 {




and


if ($gameVariables.value(16) != 0) {


instead of


if $gameVariables.value(16) != 0 {






You could also just reduce the whole thing (brackets not required in this case):

Code:
<Custom Requirement>
value = $gameVariables.value(16) < 3 && $gameVariables.value(21) < 3 
</Custom Requirement>
Code:
<Custom Requirement>
value = $gameVariables.value(16) != 0
</Custom Requirement>





Next time, please just post the full window screenshot instead of cropping it.  You've cropped it so close to the text that it makes it really hard to read.
Next time, please just post the full window screenshot instead of cropping it.  You've cropped it so close to the text that it makes it really hard to read.



Will do. Beside that, it works very good! Thanks a ton!
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.

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-javascript-error-with-yanfly-skill-core.72547/