Raised This Month: $ Target: $400
 0% 

few things about saving nicks(really important to me)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-01-2007 , 15:26   Re: few things about saving nicks(really important to me)
Reply With Quote #7

I coded this in like 10 minutes and then checked with bots and it worked.
All names are stored in g_stored_names[MAX_NAMES+1][33] array (isn't it obvious? - look at name), lines:
Code:
g_last_name_pos += 1 copy(g_stored_names[g_last_name_pos], 32, name)
@_Master_:
You should analyze whole algorithm... I set g_last_name_pos = 0 in logevent_round_start() to reset names (g_last_name_pos==0 means no names stored). "for" loop is for linear search in g_stored_names array. If there are no names stored then it shouldnt start any search, instead it will store player name in first empty cell in g_stored_names array. On next connection attempts g_last_name_pos will be >=1, so it will start the search...
__________________
Impossible is Nothing
Sylwester is offline
 



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 10:31.


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