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, 07:37 PM #11
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by Correy View Post
yes, it's not cause by the menu text.. it will be text created from mods or doHearts ect..


grrrr i dont think you get it bro :S i use Karoolus patch he has no other doHearts or other setText(); other than the actual menu and it still get string overflow.
11-05-2011, 07:40 PM #12
Correy
I'm the Original
Originally posted by xYARDSALEx View Post
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 ----------



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:


well, menu text string overflow free Winky Winky

---------- Post added at 07:40 PM ---------- Previous post was at 07:39 PM ----------

Originally posted by IVI40A3Fusionz View Post
grrrr i dont think you get it bro :S i use Karoolus patch he has no other doHearts or other setText(); other than the actual menu and it still get string overflow.


well if so, this wont give your menuText a string overflow error, it's used in all the stable menu's and used in my current menu which i've never had string overflow error from..
11-05-2011, 07:43 PM #13
Blackstorm
Veni. Vidi. Vici.
Originally posted by Correy View Post
just like different coding and much easier Smile


Not really different at all... Look at all the menus, they compile the string the exact same way. :b

---------- Post added at 01:43 PM ---------- Previous post was at 01:42 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?


Yessumms .
11-05-2011, 07:51 PM #14
Correy
I'm the Original
Originally posted by 2Fresshh View Post
Not really different at all... Look at all the menus, they compile the string the exact same way. :b

---------- Post added at 01:43 PM ---------- Previous post was at 01:42 PM ----------




Yessumms .

well it's different coding, plus an explanation so :P
11-06-2011, 04:11 AM #15
Woof
...hmm
Originally posted by Correy View Post
well it's different coding, plus an explanation so :P

He dosen't actually mean the script is the same, the method in combining the strings is the same. :p
11-06-2011, 11:07 AM #16
Correy
I'm the Original
Originally posted by BFresshh View Post
He dosen't actually mean the script is the same, the method in combining the strings is the same. :p


yeah i know lmao :p

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo