Key value help
Hi everyone I am having some issues with key values. As im still learning. Here is what I have so far.
Code:
#pragma semicolon 1 Code:
STEAMID: Tlist REASON: 1 Also here is my sm_tlist.ini layout. Code:
"Tlist" |
Re: Key value help
KvGetString doesn't return a string but stores one.
So call it before the PrintToChat and use %s (instead of %i) to show the szReason string |
Re: Key value help
Ok thank you. But now how do I navigate through my ini? I cant seem to retrieve the steamid of the user nor the reason. Here is the new code. And my ini.
Code: Code:
#pragma semicolon 1 Code:
"Tlist" |
Re: Key value help
|
Re: Key value help
Yeah trust me I read it a hundred times. :wink: But no matter what I cannot catch the steamID. I tried using
Code:
KvJumpToKey(hKV, "Banned"); |
Re: Key value help
try this:
PHP Code:
|
Re: Key value help
Thank you very much. Im going to test it now.
|
Re: Key value help
Hmm I tried it and nothing appeared when I activated the command. Would it be easier to just take out the Banned section and move everything up on level? example.
Code:
"Tlist" Code:
KvGetSectionSymbol |
Re: Key value help
Bump?? Still cant get this to work. =(
|
Re: Key value help
This is complicated, because you need to keep track of where the pointer is and will be. Some kv functions update the pointer and some don't (check the function api docs).
I don't have time right now to explain in detail, but consider this: You need to use KvGoBack sometimes, and set the keyOnly parameter to false in some calls to KvGotoFirstSubKey. I have some example code, but it's a bit complex since it use a template and dynamic calls: ConfigMgr_CacheKv in http://code.google.com/p/zombiereloa...po=zr-dev-base - This function loop through the sections in the root thee (in your case it will hit "Banned" only). GameRules_Cache in http://code.google.com/p/zombiereloa...po=zr-dev-base - This function is called by ConfigMgr_CacheKv for each section right below the root tree. Again, in your case this will only be called once, so sections in the "Banned" tree will be parsed within GameRules_Cache. I'll try update this later with a better explanation. No time right now, so maybe studying the code might help. |
All times are GMT -4. The time now is 14:46. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.