$game_party.members[x].skill_learn?($data_skills[226])
You could use what you have, but internally only the skill id is saved. Your method requires ALL skill ids to be converted to RPG::Skills, then the skill objects being compared with what you send through.
The method I provided does not require anything to be converted - it simply looks for a skill id in the internal list that matches the skill id of what you send through.
It is also the method used by the Conditional Branch.
A more efficient way than looping like that would be this:
if $game_party.members.any? {|actor| actor.skill_learn?($data_skills[226]) }would give you true if ANY party member had that skill and false if NONE of them do.
If you're out of battle and you only want to look at the battlers in your party and not the reserve members, change it to this:
Code:
if $game_party.battlers.any? {|actor| actor.skill_learn?($data_skills[226]) }
If you're in battle, you could use either one, as $game_party.members only gives you the active battlers when you're in battle.