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-02-2014, 08:45 PM #11
Originally posted by codybenti View Post
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.


I'm not sure if this helps, but instead of just calling setText on the same hud element, just delete/destroy it, then recreate the HUD element.
10-04-2014, 03:29 PM #12
TheFallen
Former Dark Night
Originally posted by Taylors
I'm not sure if this helps, but instead of just calling setText on the same hud element, just delete/destroy it, then recreate the HUD element.


That won't matter. The game caches the literal string. You can use settext how ever many times as you want as long as you don't use more than 62 unique strings.

The following user thanked TheFallen for this useful post:

Taylors Bish
10-04-2014, 04:23 PM #13
Originally posted by TheFallen View Post
That won't matter. The game caches the literal string. You can use settext how ever many times as you want as long as you don't use more than 62 unique strings.


Is there anyway to clear the cache? Because I'm constantly updating an element with different text.
10-05-2014, 01:04 AM #14
TheFallen
Former Dark Night
Originally posted by Taylors
Is there anyway to clear the cache? Because I'm constantly updating an element with different text.

Possibly, there used to be ClearAllTextAfterHudElem() but I haven't seen it produce any results. So the only way I could think of is emptying the cache through memory.
10-05-2014, 01:25 AM #15
Originally posted by TheFallen View Post
Possibly, there used to be ClearAllTextAfterHudElem() but I haven't seen it produce any results. So the only way I could think of is emptying the cache through memory.


Did you call it by just

ClearAllTextAfterHudElem();

or did you call it like this?

elem ClearAllTextAfterHudElem();
10-05-2014, 01:27 AM #16
TheFallen
Former Dark Night
Originally posted by Taylors
Did you call it by just

ClearAllTextAfterHudElem();

or did you call it like this?

elem ClearAllTextAfterHudElem();


elem ClearAllTextAfterHudElem(); I know how to use it and what it is supposed to do, it just doesn't seem to be doing it.
10-05-2014, 01:30 AM #17
Originally posted by TheFallen View Post
elem ClearAllTextAfterHudElem(); I know how to use it and what it is supposed to do, it just doesn't seem to be doing it.


Gotcha. :p
I'll take a look at it more. I only found one reference to it in _createfx and that didnt help.
10-05-2014, 04:24 AM #18
Originally posted by TheFallen View Post
elem ClearAllTextAfterHudElem(); I know how to use it and what it is supposed to do, it just doesn't seem to be doing it.


I've came to the conclusion that ClearAllTextAfterHudElem only works if its being called with an element that is defined by the level and not by a player.
10-06-2014, 12:46 PM #19
dtx12
Do a barrel roll!
Originally posted by TheFallen View Post
elem ClearAllTextAfterHudElem(); I know how to use it and what it is supposed to do, it just doesn't seem to be doing it.


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.
Last edited by dtx12 ; 10-06-2014 at 12:54 PM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo