Post: xTUL's Overflow Fix Crashes
10-24-2015, 11:53 AM #1
BullyWiiPlaza
Climbing up the ladder
(adsbygoogle = window.adsbygoogle || []).push({}); I use You must login or register to view this content. tutorial to add an overflow fix to my menu. It uses You must login or register to view this content.. I noticed that when my menu hits 50 text creations that it would freeze/crash the game. Why is that? My overflow fix code looks like the following:

    //credits to YouViolateMe
recreateText()
{
self endon("disconnect");
self endon("death");

input = self.Menu.System["MenuRoot"]; // ZeiiKeN's specific current menu variable

self thread submenu(input); // ZeiiKeN's specific submenu function
}

//Credits to dtx12, jwm614, and xTurntUpLobbies
overflowFix()
{
level endon("game_ended");

level.test = createServerFontString("default", 1.5);
level.test setText("xTUL");
level.test.alpha = 0;

while(1)
{
level waittill("textset");

self iprintln(level.result + " texts set"); // I used this for debugging and counting the text creations

if(level.result >= 50)
{
level.test clearAllTextAfterHudElem();
level.result = 0;

foreach(player in level.players)
{
if(player.MenuOpen) // ZeiiKeN-specific way of knowing if the menu is currently opened
{
player recreateText();
}
}
}

wait 0.01;
}
}

What did I do wrong and how do I fix it? Thank you
Last edited by BullyWiiPlaza ; 10-24-2015 at 12:03 PM.
10-24-2015, 10:25 PM #2
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
I use You must login or register to view this content. tutorial to add an overflow fix to my menu. It uses You must login or register to view this content.. I noticed that when my menu hits 50 text creations that it would freeze/crash the game. Why is that? My overflow fix code looks like the following:

    //credits to YouViolateMe
recreateText()
{
self endon("disconnect");
self endon("death");

input = self.Menu.System["MenuRoot"]; // ZeiiKeN's specific current menu variable

self thread submenu(input); // ZeiiKeN's specific submenu function
}

//Credits to dtx12, jwm614, and xTurntUpLobbies
overflowFix()
{
level endon("game_ended");

level.test = createServerFontString("default", 1.5);
level.test setText("xTUL");
level.test.alpha = 0;

while(1)
{
level waittill("textset");

self iprintln(level.result + " texts set"); // I used this for debugging and counting the text creations

if(level.result >= 50)
{
level.test clearAllTextAfterHudElem();
level.result = 0;

foreach(player in level.players)
{
if(player.MenuOpen) // ZeiiKeN-specific way of knowing if the menu is currently opened
{
player recreateText();
}
}
}

wait 0.01;
}
}

What did I do wrong and how do I fix it? Thank you


    //credits to YouViolateMe
recreateText()
{
self endon("disconnect");
self endon("death");

self thread submenu(input); // ZeiiKeN's specific submenu function
}

//Credits to dtx12, jwm614, and xTurntUpLobbies
overflowFix()
{
level endon("game_ended");

level.test = createServerFontString("default", 1.5);
level.test setText("xTUL");
level.test.alpha = 0;

while(1)
{
level waittill("textset");

self iprintln(level.result + " texts set"); // I used this for debugging and counting the text creations

if(level.result >= 50)
{
level.test clearAllTextAfterHudElem();
level.result = 0;

foreach(player in level.players)
{
if(player.MenuOpen) // ZeiiKeN-specific way of knowing if the menu is currently opened
{
player recreateText();
}
}
}

wait 0.01;
}
}
10-24-2015, 11:07 PM #3
BullyWiiPlaza
Climbing up the ladder
Originally posted by GentleSlugger View Post
-snip-

You just removed and not replaced the input variable declaration, how is this going to work then?
10-24-2015, 11:09 PM #4
itsSorrow
In my man cave
Originally posted by BullyWiiPlaza View Post
You just removed and not replaced the input variable declaration, how is this going to work then?


just try it..

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo