Raised This Month: $ Target: $400
 0% 

KV File to other format


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rev589
Junior Member
Join Date: Aug 2011
Location: PA
Old 10-13-2011 , 19:13   KV File to other format
Reply With Quote #1

I used the key value functions in a plugin for my server, and I was going to switch over to using SQL for multiple server support. Is there anyway I can transform the data in the txt file made by key values to a format such as an sql file or xml, really anything that can be used by phpmyadmin.

Example of my file.
Code:
	"STEAM_0:0:31308847"
	{
		"playerdata1"		"50"
		"playerdata2"		"20"
		"playerdata3"		"0"
		"playerdata4"		"0"
		"datapoints"		"50"
	}
	"STEAM_0:0:23735678"
	{
		"playerdata1"		"01"
		"playerdata2"		"10"
		"playerdata3"		"0"
		"playerdata4"		"0"
		"datapoints"		"50"
	}
	"STEAM_0:1:36637961"
	{
		"playerdata1"		"0"
		"playerdata2"		"0"
		"playerdata3"		"50"
		"playerdata4"		"0"
		"datapoints"		"0"
	}
	"STEAM_0:0:39505664"
	{
		"playerdata1"		"0"
		"playerdata2"		"0"
		"playerdata3"		"60"
		"playerdata4"		"0"
		"datapoints"		"34"
	}
rev589 is offline
Send a message via AIM to rev589 Send a message via Skype™ to rev589
Hawkeye-
Senior Member
Join Date: Jan 2009
Old 10-13-2011 , 19:22   Re: KV File to other format
Reply With Quote #2

What is the table structure for the data?

And yes, this is possible.
Hawkeye- is offline
rev589
Junior Member
Join Date: Aug 2011
Location: PA
Old 10-14-2011 , 13:18   Re: KV File to other format
Reply With Quote #3

The format is as stated above, I might not understand your wording though. What is it exactly you need to know?
rev589 is offline
Send a message via AIM to rev589 Send a message via Skype™ to rev589
rev589
Junior Member
Join Date: Aug 2011
Location: PA
Old 10-16-2011 , 14:38   Re: KV File to other format
Reply With Quote #4

Still need help
rev589 is offline
Send a message via AIM to rev589 Send a message via Skype™ to rev589
recon0
Veteran Member
Join Date: Sep 2007
Location: US
Old 10-17-2011 , 01:57   Re: KV File to other format
Reply With Quote #5

@rev589,

You can use a KV API and some simple code to transform the data. I wrote a KV API for .NET/C# that would probably work well for this. (There's a link to the SVN repository where you can find the API at the bottom of the linked post.)
__________________

Last edited by recon0; 10-17-2011 at 02:00.
recon0 is offline
Reply



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 11:46.


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