array[0][0] #Which would get the first piece of the array, and it's first sub-piece, right?Well in my script (below) that is throwing me an error saying that "No method error occured; undefined method [] for <NewCurrency>"
Here's the code: The error seems to only be on lines 220, 230, and 240... even though I'm using the same syntax on lines 160-180 above...
Spoiler
module Euphoria module Currencies CURRENCY_ONE_ON = true CURRENCY_TWO_ON = true CURRENCY_THR_ON = true XTRA_CURRENCIES_USED = 3 CURR_HASH = { "Dollars" => { :SYMBOL => "$", :DESC => "Official currency of the U.S.", :ICON => 30, :MAX => 999999, }, "Random" => { :SYMBOL => "Q", :DESC => "A strange foreign looking currency", :ICON => 31, :MAX => 999999, }, "Randomm" => { :SYMBOL => "nD", :DESC => "Unofficial currency", :ICON => 32, :MAX => 999, }, } endend#┌──────────────────────────────────────────────────────────────────────────────#│■ DataManager#└──────────────────────────────────────────────────────────────────────────────class << DataManager #ALIAS - CREATE_GAME_OBJECTS alias euphoria_multcurrency_datamanager_creategameobjects_24 create_game_objects def create_game_objects euphoria_multcurrency_datamanager_creategameobjects_24 $ECurrency = ExtraCurrencies.new end end#┌──────────────────────────────────────────────────────────────────────────────#│■ ExtraCurrencies#└──────────────────────────────────────────────────────────────────────────────class NewCurrency attr_accessor :name attr_accessor :symbol attr_accessor :desc attr_accessor :icon attr_accessor :max attr_accessor :amount #NEW - INITIALIZE def initialize(name, symbol, desc, icon, max, amount) @name = name @symbol = symbol @desc = desc @icon = icon @max = max @amount = amount end end#┌──────────────────────────────────────────────────────────────────────────────#│■ ExtraCurrencies#└──────────────────────────────────────────────────────────────────────────────class ExtraCurrencies #NEW - INITIALIZE def initialize @ecurrencies = [] add_currencies end #NEW - ADD_CURRENCIES def add_currencies Euphoria::Currencies::CURR_HASH.each {|name, val| currency = NewCurrency.new(name, val[:SYMBOL], val[:DESC], val[:ICON], val[:MAX], 0) @ecurrencies.push(currency) } end #NEW - ECURRENCIES def ecurrencies_array @ecurrencies end #NEW - INCREASE_CURRENCY def increase_currency(curr_name, amt) if @ecurrencies.any? @ecurrencies.each {|currency| if currency.name == curr_name currency.amount = [[currency.amount + amt, 0].max, currency.max].min end } end end #NEW - DECREASE_CURRENCY def decrease_currency(curr_name, amt) if @ecurrencies.any? @ecurrencies.each {|currency| if currency.name == curr_name currency.amount = [[currency.amount - amt, 0].max, currency.max].min end } end end #NEW - SET_CURRENCY def set_currency(curr_name, amt) if @ecurrencies.any? @ecurrencies.each {|currency| if currency.name == curr_name currency.amount = [[amt, 0].max, currency.max].min end } end end #NEW - CURRENCY_COUNT def currency_count(curr_name) if @ecurrencies.any? @ecurrencies.each {|currency| if currency.name == curr_name return currency.amount end } end end end#┌──────────────────────────────────────────────────────────────────────────────#│■ Game_Party#└──────────────────────────────────────────────────────────────────────────────class Game_Party < Game_Unit attr_accessor :cur_one attr_accessor :cur_two attr_accessor :cur_thr #ALIAS - INITIALIZE alias euphoria_multcurrency_gameparty_initialize_24 initialize def initialize @cur_one = 0 @cur_two = 0 @cur_thr = 0 euphoria_multcurrency_gameparty_initialize_24 end #NEW - CUR_ONE_REAL def cur_one_real @cur_one = $ECurrency.ecurrencies_array[0][5] return $ECurrency.ecurrencies_array[0][5] end #NEW - CUR_TWO_REAL def cur_two_real @cur_two = $ECurrency.ecurrencies_array[1][5] return $ECurrency.ecurrencies_array[1][5] end #NEW - CUR_THR_REAL def cur_thr_real @cur_two = $ECurrency.ecurrencies_array[2][5] return $ECurrency.ecurrencies_array[2][5] end end#┌──────────────────────────────────────────────────────────────────────────────#│■ Window_Gold#└────────────────────────────────────────────────────────────────────────────── class Window_Gold < Window_Base #OVERWRITE - INITIALIZE def initialize case Euphoria::Currencies::XTRA_CURRENCIES_USED when 3 super(0, 0, window_width, 120) when 2 super(0, 0, window_width, 96) when 1 super(0, 0, window_width, 72) else super(0, 0, window_width, 48) end refresh end #ALIAS - REFRESH alias euphoria_multcurrency_windowgold_refresh_24 refresh def refresh euphoria_multcurrency_windowgold_refresh_24 if Euphoria::Currencies::CURRENCY_ONE_ON == true draw_currency_value(val_one, unit_one, 4, 24, contents.width - 8) end if Euphoria::Currencies::CURRENCY_TWO_ON == true draw_currency_value(val_two, unit_two, 4, 48, contents.width - 8) end if Euphoria::Currencies::CURRENCY_THR_ON == true draw_currency_value(val_thr, unit_thr, 4, 72, contents.width - 8) end end #NEW - VAL_ONE def val_one $game_party.cur_one end #NEW - UNIT_ONE def unit_one return $ECurrency.ecurrencies_array[0][1].to_s end #NEW - VAL_TWO def val_two $game_party.cur_two end #NEW - UNIT_TWO def unit_two return $ECurrency.ecurrencies_array[1][1].to_s end #NEW - VAL_THR def val_thr $game_party.cur_thr end #NEW - UNIT_THR def unit_thr return $ECurrency.ecurrencies_array[2][1].to_s end end
array[0[0]] #This no longer throws me an errorNo error, but it does not display the information in that spot of the array, instead it's displaying this:

Instead of displaying the NewCurrency Amount (sub-array piece 5) and the symbol (sub-array piece 1).
I'm greatly confused... Any help would be awesome and very appreciated, explaining things to me would also be very very helpful!
Thanks, and sorry for all the questions, I just seem to be "trying" to script a lot today.