RMMV JavaScript Error with Yanfly Skill Core

Status
Not open for further replies.

frzhrt834

Infamous Warrior of Storms
Veteran
Joined
Aug 4, 2015
Messages
139
Reaction score
14
First Language
French
Primarily Uses
RMMV
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!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
I've moved this thread to Plugin Support. Please be sure to post your threads in the correct forum next time. Thank you.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

frzhrt834

Infamous Warrior of Storms
Veteran
Joined
Aug 4, 2015
Messages
139
Reaction score
14
First Language
French
Primarily Uses
RMMV
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!
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
15,381
Reaction score
8,537
First Language
English
Primarily Uses
RMMV
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,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top