Raised This Month: $12 Target: $400
 3% 

[TF2] Remove indexes from string table


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dietcoke
Junior Member
Join Date: Jan 2021
Old 06-20-2021 , 14:40   [TF2] Remove indexes from string table
Reply With Quote #1

My server crashes after a while with the error:

PHP Code:
Warning:  Table DynamicModels is fullcan't add <model string> 
I dumped the string tables and noticed there is a 2048 item limit on the DynamicModels table and it appears to add a new entry every time someone equips a cosmetic that isn't already in the table, hence the crash when it reaches 2048. I tried removing an entry with:

PHP Code:
int iDynamicModelsStringTable FindStringTable("DynamicModels");
    
int index FindStringIndex(iDynamicModelsStringTable"models/player/items/Scout/Scout_spiral.mdl");
    
    if (
iDynamicModelsStringTable != INVALID_STRING_INDEX) {
        
bool bPreviousState LockStringTables(false);
        
SetStringTableData(iDynamicModelsStringTableindex""0);
        
LockStringTables(bPreviousState);
    } else {
        
SetFailState("Could not find DynamicModels string index in table.");
    } 
but it had no effect. Is there any way to clear this table without having to restart the map/server?
dietcoke is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-21-2021 , 03:40   Re: [TF2] Remove indexes from string table
Reply With Quote #2

Stringtables are rebuilt every map change, they’re otherwise append-only.

Your code snippet there is manipulating the extra data attached to items, not the items themselves.
__________________
asherkin is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode