Post: Different way of fixing string overflow errors for your menu!
11-05-2011, 06:18 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); many people may already know this, might have come across it already but anyway. it's a different and easier method to Karoolus'
it was made by Quicksilver from S7 but shown to me by IELIITEMODZX so thanks to them for this.

i'll be showing you how to put it to a menu which has the 'addOption' function, pretty easy but here goes.

- find your 'addOption' function, the actual functional thread. it should look something like this?
this is my version so it may be a little different to yours.
    
addOption( menu, name, func, input )
{
i = self.Options.size;
self.Options[menu][i] = name;
self.Funct[menu][i] = func;
if( isDefined( input ))
{
self.Input[menu][i] = input;
}
}


we need to locate the text names so as you can see from that mine is 'self.Option', now we can work on the menu text overflow.
now, i don't know about you but i have a 'LoadMenu' function, now you want to remove All the text coding, make sure it's the text coding only or your menu could turn out to be buggy. i don't know how yours is so i can't really explain it. but anyway,

- add do this, note: you want to locate your current menu variable, mines simple 'self.CurMenu'
for your own menu text variable, mine being 'self.Option' add this,
    
string = "";
for( t=0; t<[COLOR="#FF0000"]self.Options[/COLOR].size; t++ )
string += self.Options[self.CurMenu][i]+"\n";


now, you have the text.. now you want to show it. just add this underneath.
    
self.MenuText = createFontString( undefined, 1, self );
self.MenuText setPoint( "CENTER", undefined, "", "" );
self.MenuText setText( [COLOR="#FF0000"]string[/COLOR] );


and there you have it, you'll have your own very stable menu which is completely string overflow free.
i hope this helps Smile
(adsbygoogle = window.adsbygoogle || []).push({});
11-05-2011, 06:49 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
many people may already know this, might have come across it already but anyway. it's a different and easier method to Karoolus'
it was made by Quicksilver from S7 but shown to me by IELIITEMODZX so thanks to them for this.

i'll be showing you how to put it to a menu which has the 'addOption' function, pretty easy but here goes.

- find your 'addOption' function, the actual functional thread. it should look something like this?
this is my version so it may be a little different to yours.
    
addOption( menu, name, func, input )
{
i = self.Options.size;
self.Options[menu][i] = name;
self.Funct[menu][i] = func;
if( isDefined( input ))
{
self.Input[menu][i] = input;
}
}


we need to locate the text names so as you can see from that mine is 'self.Option', now we can work on the menu text overflow.
now, i don't know about you but i have a 'LoadMenu' function, now you want to remove All the text coding, make sure it's the text coding only or your menu could turn out to be buggy. i don't know how yours is so i can't really explain it. but anyway,

- add do this, note: you want to locate your current menu variable, mines simple 'self.CurMenu'
for your own menu text variable, mine being 'self.Option' add this,
    
string = "";
for( t=0; t<[COLOR="#FF0000"]self.Options[/COLOR].size; t++ )
string += self.Options[self.CurMenu][i]+"\n";


now, you have the text.. now you want to show it. just add this underneath.
    
self.MenuText = createFontString( undefined, 1, self );
self.MenuText setPoint( "CENTER", undefined, "", "" );
self.MenuText setText( [COLOR="#FF0000"]string[/COLOR] );


and there you have it, you'll have your own very stable menu which is completely string overflow free.
i hope this helps Smile


Why are people saying menus are string overflow free when they aren't? The string overflow you will never get rid of as a new fontstring is created when you open a new sub menus if im not mistaken (This is just from previous experiences).

So if your saying this ways string overflow free i can add about 30 sub menus and have 12 people going through the all the sub menus at once? and i won't get the string overflow once?
11-05-2011, 06:53 PM #3
Correy
I'm the Original
Originally posted by IVI40A3Fusionz View Post
Why are people saying menus are string overflow free when they aren't? The string overflow you will never get rid of as a new fontstring is created when you open a new sub menus if im not mistaken (This is just from previous experiences).

So if your saying this ways string overflow free i can add about 30 sub menus and have 12 people going through the all the sub menus at once? and i won't get the string overflow once?


no cause it's a one text variable, your wrong also.
in normal menu's, they are coded to create a new line for each option, however this is all one like, but the '\n' creates a new line.

also, the string overflow error is too much text on screen, thats why this only has one text with '\n' in it, if you took them out it will give all your options in one line.

so really, everything you said there was false, create fontString only makes the font..
11-05-2011, 06:55 PM #4
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
no cause it's a one text variable, your wrong also.
in normal menu's, they are coded to create a new line for each option, however this is all one like, but the '\n' creates a new line.

also, the string overflow error is too much text on screen, thats why this only has one text with '\n' in it, if you took them out it will give all your options in one line.

so really, everything you said there was false, create fontString only makes the font..


How come i still get string overflow in every menu that claims to be string overflow free?
11-05-2011, 07:15 PM #5
Correy
I'm the Original
Originally posted by IVI40A3Fusionz View Post
How come i still get string overflow in every menu that claims to be string overflow free?


doHearts?, things like that..
11-05-2011, 07:26 PM #6
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
doHearts?, things like that..


Nope im talking about Karoolus, x_DaftVader_x TJCool's patches etc.
11-05-2011, 07:29 PM #7
Blackstorm
Veni. Vidi. Vici.
How is this a different way? Eek
11-05-2011, 07:31 PM #8
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by 2Fresshh View Post
How is this a different way? Eek


Aren't all string overflow fixes made the same way by using \n it puts the text into one long line?
11-05-2011, 07:35 PM #9
Correy
I'm the Original
Originally posted by 2Fresshh View Post
How is this a different way? Eek


just like different coding and much easier Smile

---------- Post added at 07:34 PM ---------- Previous post was at 07:33 PM ----------

Originally posted by IVI40A3Fusionz View Post
Aren't all string overflow fixes made the same way by using \n it puts the text into one long line?


they all have that but thats not the thing

---------- Post added at 07:35 PM ---------- Previous post was at 07:34 PM ----------

Originally posted by IVI40A3Fusionz View Post
Nope im talking about Karoolus, x_DaftVader_x TJCool's patches etc.


yes, it's not cause by the menu text.. it will be text created from mods or doHearts ect..
11-05-2011, 07:36 PM #10
Taylor
Former Black Knight.
Originally posted by Correy View Post

and there you have it, you'll have your own very stable menu which is completely string overflow free.
i hope this helps Smile


Not Making "STring Overflow Free" From Everything, Cod4 STill Is A Very Unstable Game, THis Will Only Prevent The Text From Causing A String Overflow, Very Very Very Misleading My Good Sir :troll:

---------- Post added at 03:36 PM ---------- Previous post was at 03:35 PM ----------

Originally posted by Correy View Post

and there you have it, you'll have your own very stable menu which is completely string overflow free.
i hope this helps Smile


Not Making "STring Overflow Free" From Everything, Cod4 STill Is A Very Unstable Game, THis Will Only Prevent The Text From Causing A String Overflow, Very Very Very Misleading My Good Sir :troll:

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo