A very large majority of stack level errors are caused by recursive method calls. I'm almost certain that you used that alias name twice within the same class or in the superclass as already stated, so you are stuck in an infinite loop of recursive method calls. Search for the offending alias name and eliminate one of them. There is nothing
technically wrong with either piece of code you posted.
It is important to use at least semi-unique names when creating your aliases, especially if you intend to be compatible with other scripts since you not only need to compete with yourself within the namespace, but anyone else potentially using it. Most scripters put a few numbers/abbreviation of their name along with a short string of words indicating the purpose of the alias.
For example:
class Scene_Item < Scene_ItemBase alias start_mith_hook_do_action01 start def start action01 start_mith_hook_do_action01 end def action01 # dont actually name your methods this # stuff and/or things endendIf you had done:
Code:
class Scene_Item < Scene_ItemBase alias start_old start def start other_stuff start_old end def other_stuff # or this, don't use names like this # stuff and/or things endend
Then you run the risk of anyone else also following poor naming conventions using the same alias
and you run the risk of using it again yourself in the future when you forget that you have already used it. Try not to pollute your namespace like that.You can get stack level errors other ways (though usually there is some kind of recursion involved, and this is by far the most common).