It returns INVALID_STRING_INDEX on error, check for that value (it is unsigned short under the hood, so it will be 65535 ). The comment in the interface should be corrected to get you to check for INVALID_STRING_INDEX and not -1.
And yes, AddString() will update an existing entry if it exists. - Alfred -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Greg "Monder" Chadwick Sent: Tuesday, April 12, 2005 7:29 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] Possible bug in INetworkStringTable::FindStringIndex Acording to the comment beside FindStringIndex in the INetworkStringTable interface definition it returns -1 if the string is not found. However it appears to return 65535 which seems like it may be the result of a signed/unsigned mismatch within the implementation that is used. I'm just wondering if this is an actual bug if I may have done something wrong to warrant this behaviour. Oh and does INetworkStringTable::AddString check to see if the string already exists before adding it? The comment above it in the interface definition leads me to believe it does. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.7 - Release Date: 12/04/2005 _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders