Error when using util.KeyValuesToTable

This is pretty much how we currently store data on our Zombie Survival server:

	"hat"		"mask"
	"timeplayed"		"336712"
	"humanskilled"		"3109"
	"progress"		"90"
		"brainpower"		"false"
		"energize"		"false"
		"magnumman"		"true"
		"steamroller"		"false"
		"sombrero"		"false"
		"mask"		"true"
		"ushat"		"false"
		"melonhead"		"false"
		"backbreaker"		"false"
		"roboteye"		"false"
		"firepower"		"false"
		"quickcure"		"true"
		"comeback"		"true"
		"gordonfreeman"		"false"
		"adrenaline"		"false"
		"bunnyears"		"false"
		"titlechanging"		"false"
		"homburg"		"false"
		"supplyguy"		"false"
		"quickredemp"		"true"
		"fleshfreak"		"false"
		"retrieval"		"false"
		"santahat"		"false"
		"ladyluck"		"true"
		"borghat"		"false"
		"greenshat"		"true"
		"blessedfists"		"false"
		"piratehat"		"false"
		"tophat"		"false"
		"pothat"		"false"
		"buckethat"		"false"
		"lastmanstand"		"false"
	"coins"		"7400"
		"feastseeker"		"false"
		"hidinkitchencloset"		"true"
		"ghost"		"true"
		"butcher"		"true"
		"sexistzombie"		"true"
		"angelofhope"		"true"
		"emo"		"true"
		"samurai"		"true"
		"spartan"		"true"
		"toolsofdestruction"		"true"
		"headfucker"		"true"
		"masterofzs"		"false"
		"dealwiththedevil"		"true"
		"launchanddestroy"		"true"
		"humanitysdamnation"		"true"
		"slayer"		"true"
		"runningmeatbag"		"true"
		"sergeant"		"true"
		"survivor"		"true"
		"marksman"		"true"
		"slowdeath"		"true"
		"iamlegend"		"true"
		"private"		"true"
		"headhumper"		"true"
		"poltergeist"		"true"
		">:("		"true"
		"meatseeker"		"true"
		"payback"		"true"
		"humanitysworstnightmare"		"true"
		"corporal"		"true"
		"ninja"		"true"
		"lightbringer"		"true"
		"laststand"		"true"
		"mankindsanswer"		"true"
		">>:o"		"true"
		"bloodseeker"		"true"
		"angelofwar"		"true"
		"stuckinpurgatory"		"true"
		"eredicator"		"true"
		"annihilator"		"true"
		"dancingqueen"		"true"
		"fuckingrambo"		"true"
	"redeems"		"444"
	"title"		"Diceroller Yup"
	"humansdamaged"		"272673.5"
	"undeadkilled"		"15877"
	"undeaddamaged"		"2276843.5"
	"name"		"Somebody*☢*Voß"
	"id"		"STEAM_0:1:111111"

Problem is, for this one guy the server couldn’t parse the file for some reason, while it worked before.

It spawned this error several times:

Keyvalues Error: LoadFromBuffer: missing { in file In

I have no idea where this is going wrong (the weird characters in the “name” key are not the cause, he had those before). Other people have files with the exact same structure yet those just work.

Maybe something with the integers becoming too big? I really don’t know.

normally it says what line?


Also, someone is about to tell you to use GLON instead. Probably Deco.

It doesn’t even mention a line. It’s just the util.KeyValuesToTable screwing up apparently.

I suggest that you use:
(Ignore the ‘datastream’ bit) (clickable picture)

The KeyValues functions are shit.

Yeah really great, and I’ll probably use it in the future. However, it does not solve my current problem.

Open it in a program like Notepad++ and look for ACSII control characters.

Told you. :smug:
On topic, does anything change if you remove the .5s or change the large numbers to smaller ones?

Try this:
PrintTable(util.KeyValuesToTable(string.gsub(THE_DATA, ‘[^%w{}"’)))