Post: How to use string overflow FIX in your own menu
10-09-2011, 09:19 AM #1
Karoolus
I'm the W@W Menu Guy !
(adsbygoogle = window.adsbygoogle || []).push({}); quite a few people are still using the old (yes, regular but BAD) way to build a menu in COD4..

since the ps3 is low on memory, i managed to fix the overflow error (as most of you know) but i still notice that most patches DON'T use this fix, which is a shame.. it virtually makes your menu uncrashable..

Where most menus use THIS to build their menu options

    for(i=0;i<level.option[value].size;i++)
{
self.display[i]= createFontString("default",1.4 ,self);
self.display[i] setPoint("TOP RIGHT","TOP RIGHT",0,level.fontstrings+(i*15));
self.display[i] setText("^7"+level.option[value][i]);
self playsound("mouse_over");
wait .035;
}


the SetText function is what's causing the overflow (set too much text at once & the game fails)
what i did was fairly simple, i made the entire menu into 1 line of text, like this:

    update_text()
{
if(IsDefined(self.display))
{
self.display Destroy();
}
wait .05;
self notify("all_cleared");
self.display= createFontString("default",1.4 ,self);
self.display setPoint("TOP RIGHT","TOP RIGHT",0,-15);
menu_options = level.option[self.curmenu][0];
for(i = 1;i < level.option[self.curmenu].size;i++)
{
menu_options = menu_options + "\n " + level.option[self.curmenu][i];
}
self.display SetText(menu_options);
}


instead of using SetText for EVERY option in your submenu, it only sets the text once, NOT causing the game to crash Winky Winky

i won't force you to use this, but i've seen some patches that are most certainly worth putting this in, just to make it (more) stable Smile


if any questions, reply HERE & don't PM me, as i won't answer..
(adsbygoogle = window.adsbygoogle || []).push({});

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

aerosoul94, AMNE, Baby-panama, cadpimp1289, Choco, Correy, DarKMaGiiC, iReset Nigga, IVI40A3Fusionz, lovebros, PWW_Commander, TheFallen, ZeiiKeN
10-09-2011, 09:52 AM #2
DarKMaGiiC
Do a barrel roll!
thanks for that bro very nice i will use this in my menus
10-09-2011, 11:31 AM #3
Originally posted by DarKMaGiiC View Post
thanks for that bro very nice i will use this in my menus


When you will release it ?

---------- Post added at 01:31 PM ---------- Previous post was at 01:31 PM ----------

Originally posted by Karoolus View Post
quite a few people are still using the old (yes, regular but BAD) way to build a menu in COD4..

since the ps3 is low on memory, i managed to fix the overflow error (as most of you know) but i still notice that most patches DON'T use this fix, which is a shame.. it virtually makes your menu uncrashable..

Where most menus use THIS to build their menu options

    for(i=0;i<level.option[value].size;i++)
{
self.display[i]= createFontString("default",1.4 ,self);
self.display[i] setPoint("TOP RIGHT","TOP RIGHT",0,level.fontstrings+(i*15));
self.display[i] setText("^7"+level.option[value][i]);
self playsound("mouse_over");
wait .035;
}


the SetText function is what's causing the overflow (set too much text at once & the game fails)
what i did was fairly simple, i made the entire menu into 1 line of text, like this:

    update_text()
{
if(IsDefined(self.display))
{
self.display Destroy();
}
wait .05;
self notify("all_cleared");
self.display= createFontString("default",1.4 ,self);
self.display setPoint("TOP RIGHT","TOP RIGHT",0,-15);
menu_options = level.option[self.curmenu][0];
for(i = 1;i < level.option[self.curmenu].size;i++)
{
menu_options = menu_options + "\n " + level.option[self.curmenu][i];
}
self.display SetText(menu_options);
}


instead of using SetText for EVERY option in your submenu, it only sets the text once, NOT causing the game to crash Winky Winky

i won't force you to use this, but i've seen some patches that are most certainly worth putting this in, just to make it (more) stable Smile


if any questions, reply HERE & don't PM me, as i won't answer..


Thaanks Hoomie For This :y: :y:
10-09-2011, 04:04 PM #4
iReset Nigga
2Fresshh!!
Originally posted by Karoolus View Post
quite a few people are still using the old (yes, regular but BAD) way to build a menu in COD4..

since the ps3 is low on memory, i managed to fix the overflow error (as most of you know) but i still notice that most patches DON'T use this fix, which is a shame.. it virtually makes your menu uncrashable..

Where most menus use THIS to build their menu options

    for(i=0;i<level.option[value].size;i++)
{
self.display[i]= createFontString("default",1.4 ,self);
self.display[i] setPoint("TOP RIGHT","TOP RIGHT",0,level.fontstrings+(i*15));
self.display[i] setText("^7"+level.option[value][i]);
self playsound("mouse_over");
wait .035;
}


the SetText function is what's causing the overflow (set too much text at once & the game fails)
what i did was fairly simple, i made the entire menu into 1 line of text, like this:

    update_text()
{
if(IsDefined(self.display))
{
self.display Destroy();
}
wait .05;
self notify("all_cleared");
self.display= createFontString("default",1.4 ,self);
self.display setPoint("TOP RIGHT","TOP RIGHT",0,-15);
menu_options = level.option[self.curmenu][0];
for(i = 1;i < level.option[self.curmenu].size;i++)
{
menu_options = menu_options + "\n " + level.option[self.curmenu][i];
}
self.display SetText(menu_options);
}


instead of using SetText for EVERY option in your submenu, it only sets the text once, NOT causing the game to crash Winky Winky

i won't force you to use this, but i've seen some patches that are most certainly worth putting this in, just to make it (more) stable Smile


if any questions, reply HERE & don't PM me, as i won't answer..



good job bro now we will see more menus that will never crash like my CF3!!! lol thanks alot :p
10-09-2011, 04:22 PM #5
Blackstorm
Veni. Vidi. Vici.
Just so you know, there's no need to space the \n part. Smile

Also, I still believe nobody has used this! This method has been around since the beginning of MW2 modding! (Last year in the summer lol)
10-09-2011, 04:30 PM #6
iReset Nigga
2Fresshh!!
Originally posted by Blackstorm View Post
Just so you know, there's no need to space the \n part. Smile

Also, I still believe nobody has used this! This method has been around since the beginning of MW2 modding! (Last year in the summer lol)


really? lol i wasnt in to mw2 modding that much
10-09-2011, 04:35 PM #7
Blackstorm
Veni. Vidi. Vici.
Originally posted by iReset View Post
really? lol i wasnt in to mw2 modding that much


Yeah, how do you think DaftVader knew about this? It was in menus in MW2 a while back. Smile

Although, it only takes common scripting sense to figure this out. Smile
10-09-2011, 04:55 PM #8
iReset Nigga
2Fresshh!!
Originally posted by Blackstorm View Post
Yeah, how do you think DaftVader knew about this? It was in menus in MW2 a while back. Smile

Although, it only takes common scripting sense to figure this out. Smile


like i have common scripting sense....lol i smoke it all away when i learn it
10-09-2011, 05:00 PM #9
Originally posted by Blackstorm View Post
Yeah, how do you think DaftVader knew about this? It was in menus in MW2 a while back. Smile

Although, it only takes common scripting sense to figure this out. Smile


I found it by accident when I was doing MW2 last year but no one had a use for it...

I told Karoolus about it as a way to write text down the screen and he put two and two together and used it for his menu..

Amanda used this in her menu but in a slightly different way..

    Buildmenu()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
FN=[];
options="^6MAIN MENU\n^7\nGod Mode\nUFO Mode\nMax Ammo\nTeleport\nForge Mode\nNuke Bullets\nKamikaze\nInvisible\nChange Model\nAuto Aim\nVisions\nSpawn 5 Bots\nMatrix Kills\nMagic Bullets\nPet Harrier\nFlamethrower\nJet Pack\nBuild Prison\nSet Trap\nPortal Gun\nCare Package\nFireworks";
self.chosen=1;
self.menuOpen=1;
self thread watchUp();
self thread watchDown();
self thread watchChosen();
10-09-2011, 05:17 PM #10
iReset Nigga
2Fresshh!!
Originally posted by x. View Post
I found it by accident when I was doing MW2 last year but no one had a use for it...

I told Karoolus about it as a way to write text down the screen and he put two and two together and used it for his menu..

Amanda used this in her menu but in a slightly different way..

    Buildmenu()
{
self endon("death");
self endon("disconnect");
self endon("menu_exit");
FN=[];
options="^6MAIN MENU\n^7\nGod Mode\nUFO Mode\nMax Ammo\nTeleport\nForge Mode\nNuke Bullets\nKamikaze\nInvisible\nChange Model\nAuto Aim\nVisions\nSpawn 5 Bots\nMatrix Kills\nMagic Bullets\nPet Harrier\nFlamethrower\nJet Pack\nBuild Prison\nSet Trap\nPortal Gun\nCare Package\nFireworks";
self.chosen=1;
self.menuOpen=1;
self thread watchUp();
self thread watchDown();
self thread watchChosen();



could i do something like this....
self.options[1]=strTok("Account Menu\nFun Menu\nVip Menu\nVisions Menu\nStats Menu\nCustomise Menu\nGame Modes Menu\nAdmin Menu","|");
self.functions[1][0]=:: menu1;
self.functions[1][1]=:: menu2;
self.functions[1][2]=:: menu3;
self.functions[1][3]=:: menu4;
self.functions[1][4]=:: menu5;
self.functions[1][5]=:: menu6;
self.functions[1][6]=:: menu11;
self.functions[1][7]=:: menu7;

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo