What is the script for these conditional branches?

Hi !

I know that this is possible with $gameSwitches.value(3) if check the switch in the game with a script,
I also know that if the actor is at a party, this can be checked with $gameParty.members().contains($gameActors.actor(7)) this.

If so, check when a specific actor is learning a specific skill.
How do I check when I have more than one specific item?

I know it can be used as a basic conditional branch, but doing so will lengthen the list and organize it into one script.
$gameActors.actor(5).hasSkill(15)

$gameParty.numItems($dataItems[8]) > 5
$gameActors.actor(5).hasSkill(15)

$gameParty.numItems($dataItems[8]) > 5

Well...
I used this script for use in HIME plugin.
hide_choice(5, $gameActors.actor(7).hasSkill(268)) || !$gameParty.members().contains($gameActors.actor(7)))
When I wrote this down, I got an error.

hide_choice(4, $gameParty.members().contains($gameActors.actor(12)) || !$gameParty.members().contains($gameActors.actor(11)))
What I wrote this works fine.
Yes. The error message says "unexpected token )" which means it's not expecting a ).

If you look at what you wrote, you will see that you have included one too many ) in your condition:

hide_choice(5, $gameActors.actor(7).hasSkill(268)) || (!$gameParty.members().contains($gameActors.actor(7)))

You have a closing ) after the hasSkill that will end the hide_choice command, and it won't know what to do with the rest of it. You also don't need a () around the second part of the condition.

For things like this, it's also always better to show a screenshot if you can - if it is all visible at once. We don't know if you copied/pasted that line, or if you retyped it, so we don't know if you might have added a typo when you typed it here, or if you had a typo in your game that you didn't reproduce here.
Yes. The error message says "unexpected token )" which means it's not expecting a ).

If you look at what you wrote, you will see that you have included one too many ) in your condition:

hide_choice(5, $gameActors.actor(7).hasSkill(268)) || (!$gameParty.members().contains($gameActors.actor(7)))

You have a closing ) after the hasSkill that will end the hide_choice command, and it won't know what to do with the rest of it. You also don't need a () around the second part of the condition.

For things like this, it's also always better to show a screenshot if you can - if it is all visible at once. We don't know if you copied/pasted that line, or if you retyped it, so we don't know if you might have added a typo when you typed it here, or if you had a typo in your game that you didn't reproduce here.

Oh, yes, I tried to copy and use the previous one).
The part that doesn't need () in the middle means members() is this part?

And I have already attached a screenshot to the file...

But, it helped me a lot, thank you!
Ah, yes you did. Sorry about that.

Change it to this:

hide_choice(5, $gameActors.actor(7).hasSkill(268) || !$gameParty.members().contains($gameActors.actor(7)))

The .hasSkill(268)) has the extra ) that needs to be removed.
The (!$gameParty.members().contains($gameActors.actor(7)) doesn't need a () around it.

Original thread: https://forums.rpgmakerweb.com/threads/what-is-the-script-for-these-conditional-branches.122657/