Suddenly I get this error whenever I try to equip an item or optimize equipment. I have no idea what is causing it or why it started. :distrust:
def has_item?(item, include_equip = false)
You were right, it was this snippet that was done for me that changes the player speed depending on certain equipment. How do I fix it?
#==============================================================================# ** Game_Party#==============================================================================class Game_Party < Game_Unit def has_item?(item_type, item_id, include_equip = false) case item_type when :weapons leader.weapons.include?($data_weapons[item_id]) when :armors leader.armors.include?($data_weapons[item_id]) end end end # Game_Party
Right, I was planning on having this armor that would increase the speed the player can dash when they wear it. Kinda like the boots in Zelda games, they allow you to run faster than you would without when you have them.
That was what the guy did to me here saying it'd work. No other script is in any way related to the speed.
#==============================================================================# ** Game_Party#==============================================================================class Game_Party < Game_Unit def has_item?(item, include_equip = false) case item when RPG::Weapon leader.weapons.include?(item, include_equip) when RPG::Armor leader.armors.include?(item, include_equip) end end end # Game_Party
Thank you Shaz but this doesn't work, it still causes the same error. This is a link to the original request topic
$game_party.any?{|actor| actor.equips.include?($data_armors[id])}
Original thread: https://forums.rpgmakerweb.com/threads/wrong-number-of-arguments.44824/