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-10-2011, 05:47 PM #20
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)
ino this is used in Quicksilver's Mod Menu aswell
10-10-2011, 06:00 PM #21
DarKMaGiiC
Do a barrel roll!
Originally posted by .Roniie View Post
When you will release it ?

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



Thaanks Hoomie For This :y: :y:


mhm dont know i will use my menu in a special mod i create with my friend Six-Tri-X. But we will release the mod on ngu Happy
10-10-2011, 09:58 PM #22
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)
I believe this method was used in Pcfreaks Old menu, correct me if im wrong?
10-10-2011, 11:14 PM #23
Blackstorm
Veni. Vidi. Vici.
Originally posted by Clown View Post
I believe this method was used in Pcfreaks Old menu, correct me if im wrong?


Uhm I'm not sure. But if it was, it was used before his menu.
10-12-2011, 02:28 AM #24
Woof
...hmm
This script basiclly does the same as the other but puts the text in one string?
Sounds like it might help...
10-15-2011, 01:31 PM #25
Taylor
Former Black Knight.
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..


Yet More Amazing Work Karoolus, Ill Try Put This In The Menu Base xCorrey Just Put Up Cuz It Does't Use It :(

---------- Post added at 09:31 AM ---------- Previous post was at 09:29 AM ----------

Originally posted by Blackstorm View Post
Uhm I'm not sure. But if it was, it was used before his menu.


I Don't Think It Was Used It His Mw2 Menu, His Mw2 Menu Was Good, And Also Looked Cool, But Was Buggy As Hell, It Wud Lay Out/Overflow Every Few Minutes
10-22-2011, 02:58 PM #26
Taylor
Former Black Knight.
can u make a tutorial on how to do this plz

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo