-----BEGIN PGP SIGNED MESSAGE----- Hash: MD5 As someone already said (but was ignored), there's built in string table functions within the HL SDK.
MAKE_STRING( "somestring" ) returns an int, and then STRING( returned_int) gives you the string back. If you're dealing with string pointers rather than string constants, use ALLOC_STRING( pszStringPointer ) At initialisation, build an array of the variables/defines you want to be able to convert, and map it to the values. So instead of having a string->int mapping, build your own int->int mapping. Basically, you're making a hash table. Then, when you read in a string, run it through MAKE_STRING/ALLOC_STRING and look up the value associated with the result. It's the only way I can see of doing this...there are defines for turning text into a string, but none for the other way, I'm afraid. [ Cruise / www.casual-tempest.net ] -----BEGIN PGP SIGNATURE----- Version: 2.6 iQCVAwUAPNe+Xvdi0Z5STRufAQHQ0AP/TT/OKXnN0CRnV0HytPwVZNlNzJq4/Vth 1VFsUh+P8vIkNhqg8vrz8orgg7mLUrD+o++go/w6d0EFw+iu0ZrZ4LR01UBGlsNb k0u0MRj/WZYFHCDogzgofLibJJsiKJJNpzFz9kAGaUztgGwbN+YHahL90nqgqchK ILG4NM4xQkg= =qv19 -----END PGP SIGNATURE----- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

