Quote:
Originally Posted by DJ Tsunami
Yes, although I don't see any reason why JumpToKey would ever return false here, so I think the if statement is unnecessary.
return; at the end of a function is also unnecessary.
|
Well, it didn't work... I have noticed a error on my code for the kv.JumpToKey. It has only 1 KvGetString and the other two are kvSetString. I have changed that but still doesn't work.
PHP Code:
void CheckForKeyValues(int client, char[] steamID)
{
KeyValues kv = new KeyValues("VIPTags");
kv.ImportFromFile(filePath);
KvGotoFirstSubKey(kv);
if(kv.JumpToKey(steamID, true))
{
KvGetString(kv, "scoretag", scoreTag[client], sizeof(scoreTag[]), "NEW SETUP - ");
KvGetString(kv, "chatcolor", chatColor[client], sizeof(chatColor[]), "{red}");
KvGetString(kv, "namecolor", nameColor[client], sizeof(nameColor[]), "{blue}");
kv.ExportToFile(filePath);
delete kv;
return;
}
return;
}
Any idea to fix this?
__________________