Let he who has not sinned cast the first stone.
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Right now i'm having a problem using SetText(), in a loop anyways it crashes after 25 - 30 minutes of game time.
The error: BG_Cache_GetIndexInternal - Exceeded '2048' items for type 'string'
Does NewHudElem have a text property I can use?
.text doesn't work.
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. | |
Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
I would guess your problem is that you aren't deleting the elements, or the defined strings are stacking up, causing an overflow. Try making the variables global, then overwriting them. You could also make a gsh file, define your strings there, then insert them where necessary. That's how 3arc does it generally. Make sure to do #insert scripts/zm/custom_strings.gsh or whatever you name it. That way new strings aren't being generated every time you define text for a hud element. Check your scripts, maybe you forgot to destroy the elements? Check for logic and/or possible loop errors as well, just to be sure unused elements aren't lingering around somehow. Another cheap trick would be to spawn a trigger, link it to the player, and give it a hintstring, but that's a shitty way to do it. I started using gsh files for most of my scripts recently, mostly for the purpose of having all my important variables in one place, easy to tweak settings etc. I only use it for strings and ints/floats, not for the hud elements themselves though. Doing it that way, I have a lot of hud elements including text and shaders, and I haven't experienced that issue. Hope the info helps man, good luck.
No your just setting it to quick and when you don't need to
Only update the string - if the string actually changes - and make sure it's not on insanely fast iterations
Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |