Raised This Month: $66 Target: $400
 16% 

[Solved] KeyValues :: DeleteThis() - when is it 0?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
quake84
Junior Member
Join Date: Aug 2014
Location: Poland
Old 06-27-2016 , 09:31   [Solved] KeyValues :: DeleteThis() - when is it 0?
Reply With Quote #1

Quote:
Return Value

1 if removal succeeded and there was another key. 0 if the current node was not contained in the previous node, or no previous node exists. -1 if removal succeeded and there were no more keys, thus the state is as if KvGoBack() was called.
I'm confused about the 0's meaning: When does is get returned? I assume -1 is when the subsection you were in becomes empty after removing the key and it calls KvGoBack() for you (you end up on the parent key), 1 is when you remove a key and there is something else in the section you're in (you end up on the next key after the one you deleted), but 0? When does it get returned?

//EDIT//

I found out the function returns 0 when you delete the topmost section/key.

Last edited by quake84; 06-27-2016 at 10:02. Reason: Answer found
quake84 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 10:36.


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