Need help With Yanfly Skill Core

am currently making a partner special similar to the ones used in Neptunia Rebirth, I want to restrict the skill with custom requirement by checking if not only that the two required party members are alive but also if they are in Battle/Active members.

I tried finding a solution on my own but I keep getting errors, am not really experienced with js code but I try what I can to use what I do know.

<Custom Requirement>

if !$gameActors.actor(1).isStateAffected(1)) and !$gameActors.actor(2).isStateAffected(1) {

value = true;

} else {

value = false;

}

</Custom Requirement>
It would help if you tell people what errors you keep getting...
It would help if you tell people what errors you keep getting...
I got a screenshot of the error right here. Sorry for not posing it before.
Error RPGMaker MV.JPG
The general idea is correct with your code, but two syntax issues to work on:

  1. There is no 'and' keyword in JavaScript. The correct syntax for 'and' is &&
  2. The parentheses aren't quite correct on your conditional statement, for example you have 4 'left' parentheses and 5 'right' parentheses in the same conditional statement, those have to be the same amount of course. And the whole conditional statement should be surrounded by one set of parentheses
The general idea is correct with your code, but two syntax issues to work on:

  1. There is no 'and' keyword in JavaScript. The correct syntax for 'and' is &&
  2. The parentheses aren't quite correct on your conditional statement, for example you have 4 'left' parentheses and 5 'right' parentheses in the same conditional statement, those have to be the same amount of course. And the whole conditional statement should be surrounded by one set of parentheses

Worked flawlessly! thanks for the help, do you happen to know where I can look up other javascript keywords? I feel like i'm going to encounter another issue like this eventually so having a good place to search for correct keywords would help a lot.
any of the hundreds or thousands of javascript academies and tutorials around the internet.
Javascript is one of the languages used for programming websites after all
For starting out as a beginner you can try:
https://www.w3schools.com
For starting out as a beginner you can try:
https://www.w3schools.com
I'll give it a shot, thanks!
am currently making a partner special similar to the ones used in Neptunia Rebirth, I want to restrict the skill with custom requirement by checking if not only that the two required party members are alive but also if they are in Battle/Active members.

I tried finding a solution on my own but I keep getting errors, am not really experienced with js code but I try what I can to use what I do know.

<Custom Requirement>

if !$gameActors.actor(1).isStateAffected(1)) and !$gameActors.actor(2).isStateAffected(1) {

value = true;

} else {

value = false;

}

</Custom Requirement>


<Custom Requirement>
if ( $gameParty.aliveMembers().contains($gameActors.actor(1)) && $gameParty.aliveMembers().contains($gameActors.actor(2)) ) {
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Requirement>
if ( $gameParty.aliveMembers().contains($gameActors.actor(1)) && $gameParty.aliveMembers().contains($gameActors.actor(2)) ) {
value = true;
} else {
value = false;
}
</Custom Requirement>

That's an even better solution thanks!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-yanfly-skill-core.91260/