Post: [Noob Friendly TUT] How to add overflow prevention to your mod menu
03-08-2015, 09:12 PM #1
Im_YouViolateMe
NextGenUpdate Elite
(adsbygoogle = window.adsbygoogle || []).push({});

You must login or register to view this content.
You must login or register to view this content.
(Shrek is love, shrek is life.)

Overflow fix originally by:[/size]
jwm614[/size]

Working overflow fix created by:[/size]
xTurntUpLobbies[/size]

Let's Begin!



Requirements


  • GSC Studio


  • A working mod menu with no syntax errors, and does not already have any overflow fix added.


  • The overflow fix code: You must login or register to view this content.


  • Some knowledge of Game Script Code


  • A brain



Tutorial

Ok so in this tutorial, I will be using the White Water Base. I know it already has the overflow fix incorporated, but I will be taking it out (as if it was a clean base with no overflow fix). I will also be detailing how to add this overflow fix to TheFallen's base. Let's get started.


  1. Open up GSC Studio. Locate your project, if it is not already opened.


  2. Create a new script and call it anything you want (such as overflowfix, xTUL_overflow, antioverflow, etc.) You must login or register to view this content.


  3. Go to the link with the overflow fix (You must login or register to view this content.), and paste in the code in the newly created script.


  4. It should now look like this: You must login or register to view this content.


  5. Here comes the fun part, getting it to support your base. If you are using shark's base, or my base, then this should be easy for you. If you are using TheFallen's then it might be tricky (due to how advanced the coding is in his menu)


  6. Firstly, what you want to do is write this code under onPlayerSpawned. It must be only called once by the host. This is what initiates/starts the overflow fix. You will need to create a boolean called isFirstSpawn before this code is called, and the boolean needs to be created before the for loop statement, so it doesn't always set to false.
        
    if(isFirstSpawn)
    {
    if (self isHost())
    {
    thread overflowfix();
    isFirstSpawn = false;
    }
    }



  7. This next step, you need to find your createText() function (or something similar such as drawText). The code inside this function calls the createFontString method. It should be easy to find, if you organize your functions.


  8. You will need to add this code inside the createText function.
        
    level.result += 1;
    textElem setText(text);
    level notify("textset");

    textElem is the name of the local element. This is not the actual name of the text element! (such as self.title or self.menu.options, etc)


  9. Next, under the init() function (which is usually in main), create a new level variable called result and set the value to 0.
        
    level.result = 0;

    You must login or register to view this content.


  10. Next, we will go into the overflow script again. Find this code in the overflowfix function You must login or register to view this content.


  11. player.menu.open is a boolean. It refers to the variable that checks whether or not the menu is open. It must be player and NOT self! Depending on the menu you use, the variable name will change. For Surge menu base, usually the variable is player.surge["menu"]["active"]. Change the name of the variable to the correct name, that your menu uses, and make sure the condition is true. You don't want the text to recreate when your out of the menu.


  12. The next and final step can be a little confusing, but it's the last step. In the recreatetext() function you will need to call the function that draws your options on the screen (such as submenu). self.curMenu and self.curTitle are 2 custom variables created that when submenu() is called, sets them to hold the current name of the menu and the current title of the menu. Surge, I believe, does not have the self.curTitle variable. So you will need to just create a variable to hold the current name of the menu, so submenu() knows which menu to open when recreatetext() is called.

    For surge menu base, just call self updatehud(); under recreateText()

    Think of it like this:

    You are inside the menu, in the "admin menu".
    The max amount of strings has been reached, so recreatetext() is called. All the text elements have been deleted.
    Recreatetext will then call submenu(menuname, titletext) with either 1 or 2 parameters (it just depends on the base).
    Your current menu options have been re-drawn to the screen.
    This occurs on a continuous loop of just deleting text, and redrawing the elements.

    You should not do this with anything other than text elements.



There you have it! You've successfully added the overflow fix to your menu!
Credits:

Jwm614
TheFallen
dtx12
Craig Christ
Shark
xTurntUpLobbies
YouViolateMe
JokerRey


You can add me on skype: nlovett218 if you have any questions. Thank you!
(adsbygoogle = window.adsbygoogle || []).push({});

The following 13 users say thank you to Im_YouViolateMe for this useful post:

/SneakerStreet/, FRINZ, BullyWiiPlaza, DF_AUS, Dj33dj33, EternalHabit, HiddenHour, iiioM, ksa_7ooo7, Patrick, Skonafid, V--JR7, Vondy Supreme
03-10-2015, 08:58 PM #11
cn somone skype me and help me? My Skype s1lv3rhd. Will give credits in my menu.
03-11-2015, 02:03 PM #12
Originally posted by iSilverrHD View Post
cn somone skype me and help me? My Skype s1lv3rhd. Will give credits in my menu.


addet you
06-11-2015, 03:15 AM #13
EternalHabit
Former Staff
Originally posted by YouViolateMe View Post

You must login or register to view this content.
You must login or register to view this content.
(Shrek is love, shrek is life.)

Overflow fix originally by:[/size]
jwm614[/size]

Working overflow fix created by:[/size]
xTurntUpLobbies[/size]

Let's Begin!



Requirements


  • GSC Studio


  • A working mod menu with no syntax errors, and does not already have any overflow fix added.


  • The overflow fix code: You must login or register to view this content.


  • Some knowledge of Game Script Code


  • A brain



Tutorial

Ok so in this tutorial, I will be using the White Water Base. I know it already has the overflow fix incorporated, but I will be taking it out (as if it was a clean base with no overflow fix). I will also be detailing how to add this overflow fix to TheFallen's base. Let's get started.


  1. Open up GSC Studio. Locate your project, if it is not already opened.


  2. Create a new script and call it anything you want (such as overflowfix, xTUL_overflow, antioverflow, etc.) You must login or register to view this content.


  3. Go to the link with the overflow fix (You must login or register to view this content.), and paste in the code in the newly created script.


  4. It should now look like this: You must login or register to view this content.


  5. Here comes the fun part, getting it to support your base. If you are using shark's base, or my base, then this should be easy for you. If you are using TheFallen's then it might be tricky (due to how advanced the coding is in his menu)


  6. Firstly, what you want to do is write this code under onPlayerSpawned. It must be only called once by the host. This is what initiates/starts the overflow fix. You will need to create a boolean called isFirstSpawn before this code is called, and the boolean needs to be created before the for loop statement, so it doesn't always set to false.
        
    if(isFirstSpawn)
    {
    if (self isHost())
    {
    thread overflowfix();
    isFirstSpawn = false;
    }
    }



  7. This next step, you need to find your createText() function (or something similar such as drawText). The code inside this function calls the createFontString method. It should be easy to find, if you organize your functions.


  8. You will need to add this code inside the createText function.
        
    level.result += 1;
    textElem setText(text);
    level notify("textset");

    textElem is the name of the local element. This is not the actual name of the text element! (such as self.title or self.menu.options, etc)


  9. Next, under the init() function (which is usually in main), create a new level variable called result and set the value to 0.
        
    level.result = 0;

    You must login or register to view this content.


  10. Next, we will go into the overflow script again. Find this code in the overflowfix function You must login or register to view this content.


  11. player.menu.open is a boolean. It refers to the variable that checks whether or not the menu is open. It must be player and NOT self! Depending on the menu you use, the variable name will change. For Surge menu base, usually the variable is player.surge["menu"]["active"]. Change the name of the variable to the correct name, that your menu uses, and make sure the condition is true. You don't want the text to recreate when your out of the menu.


  12. The next and final step can be a little confusing, but it's the last step. In the recreatetext() function you will need to call the function that draws your options on the screen (such as submenu). self.curMenu and self.curTitle are 2 custom variables created that when submenu() is called, sets them to hold the current name of the menu and the current title of the menu. Surge, I believe, does not have the self.curTitle variable. So you will need to just create a variable to hold the current name of the menu, so submenu() knows which menu to open when recreatetext() is called.

    For surge menu base, just call self updatehud(); under recreateText()

    Think of it like this:

    You are inside the menu, in the "admin menu".
    The max amount of strings has been reached, so recreatetext() is called. All the text elements have been deleted.
    Recreatetext will then call submenu(menuname, titletext) with either 1 or 2 parameters (it just depends on the base).
    Your current menu options have been re-drawn to the screen.
    This occurs on a continuous loop of just deleting text, and redrawing the elements.

    You should not do this with anything other than text elements.



There you have it! You've successfully added the overflow fix to your menu!
Credits:

Jwm614
TheFallen
dtx12
Craig Christ
Shark
xTurntUpLobbies
YouViolateMe
JokerRey


You can add me on skype: nlovett218 if you have any questions. Thank you!

bump Tustin

The following user thanked EternalHabit for this useful post:

Im_YouViolateMe
07-12-2015, 04:44 AM #14
cddeleon1
Do a barrel roll!
how about for zombieland?
07-12-2015, 05:27 AM #15
Adrian
Adrian is back!
Originally posted by YouViolateMe View Post

You must login or register to view this content.
You must login or register to view this content.
(Shrek is love, shrek is life.)

Overflow fix originally by:[/size]
jwm614[/size]

Working overflow fix created by:[/size]
xTurntUpLobbies[/size]

Let's Begin!



Requirements


  • GSC Studio


  • A working mod menu with no syntax errors, and does not already have any overflow fix added.


  • The overflow fix code: You must login or register to view this content.


  • Some knowledge of Game Script Code


  • A brain



Tutorial

Ok so in this tutorial, I will be using the White Water Base. I know it already has the overflow fix incorporated, but I will be taking it out (as if it was a clean base with no overflow fix). I will also be detailing how to add this overflow fix to TheFallen's base. Let's get started.


  1. Open up GSC Studio. Locate your project, if it is not already opened.


  2. Create a new script and call it anything you want (such as overflowfix, xTUL_overflow, antioverflow, etc.) You must login or register to view this content.


  3. Go to the link with the overflow fix (You must login or register to view this content.), and paste in the code in the newly created script.


  4. It should now look like this: You must login or register to view this content.


  5. Here comes the fun part, getting it to support your base. If you are using shark's base, or my base, then this should be easy for you. If you are using TheFallen's then it might be tricky (due to how advanced the coding is in his menu)


  6. Firstly, what you want to do is write this code under onPlayerSpawned. It must be only called once by the host. This is what initiates/starts the overflow fix. You will need to create a boolean called isFirstSpawn before this code is called, and the boolean needs to be created before the for loop statement, so it doesn't always set to false.
        
    if(isFirstSpawn)
    {
    if (self isHost())
    {
    thread overflowfix();
    isFirstSpawn = false;
    }
    }



  7. This next step, you need to find your createText() function (or something similar such as drawText). The code inside this function calls the createFontString method. It should be easy to find, if you organize your functions.


  8. You will need to add this code inside the createText function.
        
    level.result += 1;
    textElem setText(text);
    level notify("textset");

    textElem is the name of the local element. This is not the actual name of the text element! (such as self.title or self.menu.options, etc)


  9. Next, under the init() function (which is usually in main), create a new level variable called result and set the value to 0.
        
    level.result = 0;

    You must login or register to view this content.


  10. Next, we will go into the overflow script again. Find this code in the overflowfix function You must login or register to view this content.


  11. player.menu.open is a boolean. It refers to the variable that checks whether or not the menu is open. It must be player and NOT self! Depending on the menu you use, the variable name will change. For Surge menu base, usually the variable is player.surge["menu"]["active"]. Change the name of the variable to the correct name, that your menu uses, and make sure the condition is true. You don't want the text to recreate when your out of the menu.


  12. The next and final step can be a little confusing, but it's the last step. In the recreatetext() function you will need to call the function that draws your options on the screen (such as submenu). self.curMenu and self.curTitle are 2 custom variables created that when submenu() is called, sets them to hold the current name of the menu and the current title of the menu. Surge, I believe, does not have the self.curTitle variable. So you will need to just create a variable to hold the current name of the menu, so submenu() knows which menu to open when recreatetext() is called.

    For surge menu base, just call self updatehud(); under recreateText()

    Think of it like this:

    You are inside the menu, in the "admin menu".
    The max amount of strings has been reached, so recreatetext() is called. All the text elements have been deleted.
    Recreatetext will then call submenu(menuname, titletext) with either 1 or 2 parameters (it just depends on the base).
    Your current menu options have been re-drawn to the screen.
    This occurs on a continuous loop of just deleting text, and redrawing the elements.

    You should not do this with anything other than text elements.



There you have it! You've successfully added the overflow fix to your menu!
Credits:

Jwm614
TheFallen
dtx12
Craig Christ
Shark
xTurntUpLobbies
YouViolateMe
JokerRey


You can add me on skype: nlovett218 if you have any questions. Thank you!


nice tutorial im sure it will help loads of people out Smile
07-20-2015, 10:40 AM #16
hey im new to coding... does overflow fix the freezing when trying to start up a game??
07-20-2015, 11:32 AM #17
Originally posted by xTurntUpLobbies View Post
Underrated thread lol


a screenshot for the last step would be nice :/ thanks. im using sharks base btw
07-20-2015, 11:51 AM #18
DF_AUS
NextGenUpdate Elite
I used this in my ZL edit a while back,all worked well with no issues...but for some reason when using ziplines it displays text from the shop menu instead of displaying " Press ( square ) to use zipline "
07-22-2015, 12:27 AM #19
Originally posted by YouViolateMe View Post

You must login or register to view this content.
You must login or register to view this content.
(Shrek is love, shrek is life.)

Overflow fix originally by:[/size]
jwm614[/size]

Working overflow fix created by:[/size]
xTurntUpLobbies[/size]

Let's Begin!



Requirements


  • GSC Studio


  • A working mod menu with no syntax errors, and does not already have any overflow fix added.


  • The overflow fix code: You must login or register to view this content.


  • Some knowledge of Game Script Code


  • A brain



Tutorial

Ok so in this tutorial, I will be using the White Water Base. I know it already has the overflow fix incorporated, but I will be taking it out (as if it was a clean base with no overflow fix). I will also be detailing how to add this overflow fix to TheFallen's base. Let's get started.


  1. Open up GSC Studio. Locate your project, if it is not already opened.


  2. Create a new script and call it anything you want (such as overflowfix, xTUL_overflow, antioverflow, etc.) You must login or register to view this content.


  3. Go to the link with the overflow fix (You must login or register to view this content.), and paste in the code in the newly created script.


  4. It should now look like this: You must login or register to view this content.


  5. Here comes the fun part, getting it to support your base. If you are using shark's base, or my base, then this should be easy for you. If you are using TheFallen's then it might be tricky (due to how advanced the coding is in his menu)


  6. Firstly, what you want to do is write this code under onPlayerSpawned. It must be only called once by the host. This is what initiates/starts the overflow fix. You will need to create a boolean called isFirstSpawn before this code is called, and the boolean needs to be created before the for loop statement, so it doesn't always set to false.
        
    if(isFirstSpawn)
    {
    if (self isHost())
    {
    thread overflowfix();
    isFirstSpawn = false;
    }
    }



  7. This next step, you need to find your createText() function (or something similar such as drawText). The code inside this function calls the createFontString method. It should be easy to find, if you organize your functions.


  8. You will need to add this code inside the createText function.
        
    level.result += 1;
    textElem setText(text);
    level notify("textset");

    textElem is the name of the local element. This is not the actual name of the text element! (such as self.title or self.menu.options, etc)


  9. Next, under the init() function (which is usually in main), create a new level variable called result and set the value to 0.
        
    level.result = 0;

    You must login or register to view this content.


  10. Next, we will go into the overflow script again. Find this code in the overflowfix function You must login or register to view this content.


  11. player.menu.open is a boolean. It refers to the variable that checks whether or not the menu is open. It must be player and NOT self! Depending on the menu you use, the variable name will change. For Surge menu base, usually the variable is player.surge["menu"]["active"]. Change the name of the variable to the correct name, that your menu uses, and make sure the condition is true. You don't want the text to recreate when your out of the menu.


  12. The next and final step can be a little confusing, but it's the last step. In the recreatetext() function you will need to call the function that draws your options on the screen (such as submenu). self.curMenu and self.curTitle are 2 custom variables created that when submenu() is called, sets them to hold the current name of the menu and the current title of the menu. Surge, I believe, does not have the self.curTitle variable. So you will need to just create a variable to hold the current name of the menu, so submenu() knows which menu to open when recreatetext() is called.

    For surge menu base, just call self updatehud(); under recreateText()

    Think of it like this:

    You are inside the menu, in the "admin menu".
    The max amount of strings has been reached, so recreatetext() is called. All the text elements have been deleted.
    Recreatetext will then call submenu(menuname, titletext) with either 1 or 2 parameters (it just depends on the base).
    Your current menu options have been re-drawn to the screen.
    This occurs on a continuous loop of just deleting text, and redrawing the elements.

    You should not do this with anything other than text elements.



There you have it! You've successfully added the overflow fix to your menu!
Credits:

Jwm614
TheFallen
dtx12
Craig Christ
Shark
xTurntUpLobbies
YouViolateMe
JokerRey


You can add me on skype: nlovett218 if you have any questions. Thank you!




My menu comes up but i dont see any text in the menu :/ using sharks base

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo