Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyValues ExportToFile Not Including Colors #689

Closed
Headline opened this issue Sep 23, 2017 · 1 comment
Closed

KeyValues ExportToFile Not Including Colors #689

Headline opened this issue Sep 23, 2017 · 1 comment

Comments

@Headline
Copy link
Member

Headline commented Sep 23, 2017

Test case:

public void OnPluginStart()
{
	char path[PLATFORM_MAX_PATH];
	BuildPath(Path_SM, path, sizeof(path), "configs/somefile.txt");
	
	KeyValues kv = CreateKeyValues("some_kv");
	kv.SetColor("some_color", 255, 0, 0, 0);
	
	int r, g, b, a;
	kv.GetColor("some_color", r, g, b ,a);
	
	PrintToServer("%i %i %i %i", r, g, b, a);
	
	kv.ExportToFile(path);
	
}

Console output:

255 0 0 0
[SM] Plugin kv_testcase.smx reloaded successfully.

File output:

"some_kv"
{
}

This was reported to me by Drixevel, so thanks to him for reporting it.

Edit: I guess it's unimplemented in hl2sdk ref:https://github.com/alliedmodders/hl2sdk/blob/sdk2013/tier1/KeyValues.cpp#L973

@KyleSanderson
Copy link
Member

I've mailed tfteam for you. If they implement it that's great; if not well, this is an SDK issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants