Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[FILLED] A little bit of help with this script

Sephiroth Spawn made this script initially so credits to him. My problem is that I don't know how to use it

PHP:
class Game_Party
  # limit_type = { item_id => limit, ... }
  Item_Limits = {}
  Weapon_Limits = {}
  Armor_Limits = {}
  alias seph_itemlimits_gameprty_gainitem gain_item
  alias seph_itemlimits_gameprty_gainweapon gain_weapon
  alias seph_itemlimits_gameprty_gainarmor gain_armor
  def gain_item(item_id, n)
    seph_itemlimits_gameprty_gainitem(item_id, n)
    if Item_Limits.has_key?(item_id)
      @items[item_id] = [[@items[item_id], 0].max, Item_Limits[item_id]].min
    end
  end
  def gain_weapon(item_id, n)
    seph_itemlimits_gameprty_gainweapon(item_id, n)
    if Weapon_Limits.has_key?(item_id)
      @weapons[item_id] = [[@weapons[item_id], 0].max, Weapon_Limits[item_id]].min
    end
  end
  def gain_armor(item_id, n)
    seph_itemlimits_gameprty_gainarmor(item_id, n)
    if Armor_Limits.has_key?(item_id)
      @armors[item_id] = [[@armors[item_id], 0].max, Armor_Limits[item_id]].min
    end
  end
end

I keep getting a syntax error on line 12
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top