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.

Stack Level too deep?

sometime, when im doing a code and press f12 to start the test, a message will come up as follow: "stack level too deep". and goes back to map editor. (does not let me play/test my game)
 
sephy's vehicle script can cause this too. the only solution is to get rid of the aliases (from the script that is causing the problem) and put the code directly in the original functions.
 
Stack Level too deep occurs when a method is called recursive over a period a time. An example is if function A calls function B and function B calls function A. There will be no end to the callings.
 
It's a simple fix.

Code:
code <class_definition>
  if @<scriptname_classname>.nil?
    # Put your aliases here
    @<scriptname_classname> = true
  end
  # Rest of Code
end

Just give me the script that causes the error, and I will fix it.
 

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