Post: String overflow fix.
10-01-2014, 06:07 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I started to work on a GSC menu on BO2 and I keep running into the overflow error.
I remember this was a major problem on COD4 until Amanda released a fix.
She found a way to free up a large amount of strings. I'm wondering if this can be done on BO2.
Here is a link to Amanda's overflow error fix.

You must login or register to view this content.

Any kind of help would be greatly appreciated.
10-06-2014, 01:51 PM #20
TheFallen
Former Dark Night
Originally posted by dtx12 View Post
I just checked what this function suppose to do, and when this function find right index for string, it suppose to call sv_setconfigstring and set value for this string(and all strings above) to string terminator. But sv_setconfigstring just returns after strcmp. I'm sure, this function shouldn't work like this.


Yeah that doesn't sound right haha. Have you looked at other CoDs for that function?
10-06-2014, 02:09 PM #21
dtx12
Do a barrel roll!
Originally posted by TheFallen View Post
Yeah that doesn't sound right haha. Have you looked at other CoDs for that function?

I'm not sure that it's worth the time, in cod4 we had limit 1023 unique string, in BO2 we can have only 512 unique strings(pretty stupid yes?), I guess limit can be extended.
Last edited by dtx12 ; 10-06-2014 at 02:13 PM.
10-06-2014, 02:44 PM #22
TheFallen
Former Dark Night
Originally posted by dtx12 View Post
I'm not sure that it's worth the time, in cod4 we had limit 1023 unique string, in BO2 we can have only 512 unique strings(pretty stupid yes?), I guess limit can be extended.


I thought it was 488? I know for sure that there are only 62 strings available. Anyway does that function have the limit in it?
10-06-2014, 02:53 PM #23
dtx12
Do a barrel roll!
Originally posted by TheFallen View Post
I thought it was 488? I know for sure that there are only 62 strings available. Anyway does that function have the limit in it?


You must login or register to view this content.
Also G_LocalizedStringIndex throws overflow on this index, so I guess this is the game limit. Also I mean all strings(including precached)
Last edited by dtx12 ; 10-06-2014 at 02:56 PM.
10-06-2014, 04:06 PM #24
There's a lot of useless messages (like completing a challenge) shown in the game. Each unique message takes up a string. Just wondering if these messages can be removed or simplified to free up more strings.
10-06-2014, 09:08 PM #25
TheFallen
Former Dark Night
Originally posted by codybenti View Post
There's a lot of useless messages (like completing a challenge) shown in the game. Each unique message takes up a string. Just wondering if these messages can be removed or simplified to free up more strings.


You can if you can find where they are being used.
10-06-2014, 09:09 PM #26
TheFallen
Former Dark Night
Originally posted by dtx12 View Post
You must login or register to view this content.
Also G_LocalizedStringIndex throws overflow on this index, so I guess this is the game limit. Also I mean all strings(including precached)


Gotcha. Do you know where/how the strings are stored exactly? Or can you see that in the functions?
10-07-2014, 08:31 AM #27
dtx12
Do a barrel roll!
Originally posted by TheFallen View Post
Gotcha. Do you know where/how the strings are stored exactly? Or can you see that in the functions?


After more digging, I found, that we just used this function wrong, this will work for example(really strange implementation, also).
Also I don't like this solution, I'll try to find the way to extend strings limit.
    
Overflow()
{
test = self createfontstring("default",1.5);
test setText("fuck it");
display = self createfontstring("default",1.5);
display setPoint("CENTER","CENTER",0,0);
for(i = 0;;i++)
{
display setText("Overflow on " + i);
result = i%60;
if(result == 0)
test clearAllTextAfterHudElem();//prevent overflow
wait .1;
}
}

Last edited by dtx12 ; 10-07-2014 at 09:08 AM.

The following 3 users say thank you to dtx12 for this useful post:

EternalHabit, ItsLollo1000, Taylors Bish
10-07-2014, 12:28 PM #28
TheFallen
Former Dark Night
Originally posted by dtx12 View Post
After more digging, I found, that we just used this function wrong, this will work for example(really strange implementation, also).
Also I don't like this solution, I'll try to find the way to extend strings limit.
    
Overflow()
{
test = self createfontstring("default",1.5);
test setText("fuck it");
display = self createfontstring("default",1.5);
display setPoint("CENTER","CENTER",0,0);
for(i = 0;;i++)
{
display setText("Overflow on " + i);
result = i%60;
if(result == 0)
test clearAllTextAfterHudElem();//prevent overflow
wait .1;
}
}



I did that too but I had no luck with it. If you remove the clearAllblah part does it still work?
Last edited by TheFallen ; 10-07-2014 at 12:31 PM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo