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

kv.GetSectionName strange bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 04-02-2020 , 13:56   kv.GetSectionName strange bug
Reply With Quote #1

So I get these strings with kv.GetSectionName:

PHP Code:
Health
Equipment
Mod 
and this method returns these strings with the first character as lowercase:

PHP Code:
health
equipment
mod 
Its happening with only some of them, if I put space after the string, it returns as it should be.
Is this something normal for this function?
__________________

Last edited by Ilusion9; 04-02-2020 at 13:56.
Ilusion9 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-02-2020 , 16:49   Re: kv.GetSectionName strange bug
Reply With Quote #2

Yes, KeyValue keys are case-insensitively interned by the game - whichever case of a key is sees first is the only value stored. You must use values if you want to preserve the case of strings in KeyValues.
__________________
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 02:38.


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