Raised This Month: $ Target: $400
 0% 

TrieDeleteKey && ArrayDeleteItem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-04-2011 , 12:10   TrieDeleteKey && ArrayDeleteItem
Reply With Quote #1

Does this 2 function update array and trie data?
I'm having problem with this two function, trie/array isn't updated.
I used Advanced bans, as start point.
Code:
RemoveMark(Position, const TargetID[])
{
	TrieDeleteKey(g_tSteamIDs, TargetID);
	ArrayDeleteItem(g_DataArray, Position);
	
	g_total_comments--;
	
	new iFile = fopen(g_CommentFile, "wt");
	
	new Data[SpecData];

	for( new i = 0; i < g_total_comments; i++ )
	{
		ArrayGetArray(g_DataArray, i, Data);
		TrieSetCell(g_tSteamIDs, Data[Data_SteamID], i);
		
		fprintf(iFile, "^"%s^" ^"%s^"^n", Data[Data_SteamID], Data[Data_Comment]);
	}
	fclose(iFile);
}
OvidiuS is offline
Send a message via Skype™ to OvidiuS
 



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 11:55.


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