Question Internal script stack overflow

Discussion in 'Call of Duty: Black Ops 2 Scripts Questions' started by Tyne, Aug 30, 2018.

  1. Tyne

    Tyne New Member

    9
    0
    1
    Credits:
    57
    Making a Zombies menu for BO2, every time I attempt to enter a submenu, the game crashes, giving me a "Internal script stack overflow."

    Not sure what the root of the problem is and I've tried multiple solutions.
     

    Attached Files:

  2. Cxwh

    Cxwh Known Member

    63
    41
    118
    Credits:
    1,447
    Give me a sec I‘m on it king :grinning:
     
  3. Tyne

    Tyne New Member

    9
    0
    1
    Credits:
    57
    Thanks
     
  4. ReleaseTheMong

    ReleaseTheMong Known Member

    29
    17
    118
    Credits:
    315
    Most likely the issue lies in one of your many loops.
    Internal script stack overflow occurs when the game is trying to add a new variable to the script stack, so if you are calling a function over and over within its self or you are running a loop that adds new script variables infinitely.

    If your menu opens fine and the only issue is submenus, i would be willing to bet that the issue is in this line :
    self thread [[self.Menu.Func[self.Menu.Current][self.cursor]]](self.Menu.Input[self.Menu.Current][self.cursor]);

    Also heads up, you shouldnt name your give weapon function 'giveweapon', since it is the same as the built in function.

    Other than that, the script looks fine. I would just trace it step by step and try to figure out if something is undefined.
     
  5. Tyne

    Tyne New Member

    9
    0
    1
    Credits:
    57
    I'll be sure to look through the loops. I'm new to GSC scripting but I have few experience in code.

    I was looking at a menu a friend of mine made and that line seemed to work just fine in his code. I tried the same thing, making sure the variables were renamed appropriately with the names I had, but that wasn't working.
     

Share This Page