In the already-delayed-enough development of PAC Main Menu, I've hit a rather annoying roadblock.
In the configuration of the script, you put the name of the command you want in quotation marks. Simple enough:
ITEMS = [
'Inventory',
etc...
]
and you enter the other information on that command in the other configurable hashes, using the name you designated in the ITEMS array.
To optimize awesomeness, I decided to make each scene return to the correct index. I tried something like this in each of the scenes' (default, anyway) return_scene method.
class Scene_Equip < Scene_Base
def return_scene
$scene = Scene_Menu.new(PAC::MM::ITEMS.index('Equip'))
end
end
And I thought it would all work until I realized not everyone will be calling that command 'Equip'. Which means it will go wrong when it tries to find that index D:
So, of course, I put an attr_accessor of menu_index in Scene_Menu and try to read that through the return_scene method of all of these scenes.
class Scene_Equip < Scene_Base
def return_scene
$scene = Scene_Menu.new(Scene_Menu.menu_index)
end
end
However, when that happens... it throws me an no method error:
undefined method `menu_index' for Scene_Menu:Class
So I even put a method to return the value. Still, the same error.
What's happening, and how would I get the index value?