c# dictionary issue when saving to a file.

  • Thread starter Thread starter elfenliedtopfan2
  • Start date Start date
E

elfenliedtopfan2

Guest
ok i am creating a program that loads in a file splits to key value pairs and saves to a diffent format file and for the most part the program works perfectly but the issue im having is when i do

dict.Add("key1,"value"); manally it adds to list but on save it will not save out the ones i custom add this is the code i have

public void animadds()
{
elfweapon.Add(elfweapon.Properties, "idleAnim", Taiga.idle);
}


and this is the code that reads in the file.

the load funtion

and when it saves out it just dont include the line i added but includes the all the stuff the file has and i not sure how to get it to include my adds into it.

this is a picture of what i mean

QAxm7XP.png

as you can see form there it clearly added right at the bottom but here in the save out its clearly not there.

{
{

"weaponClass" "rifle"
"weaponType" "bullet"
"whizbySound" ""
"worldClipModel" "t6_attach_mag_an94_world"
"worldFlashEffect" "fx\weapon\fx_muz_sm_pistol_3p.efx"
"worldFlashOffsetX" "0"
"worldFlashOffsetY" "0"
"worldFlashOffsetZ" "0"
"worldLastShotEjectEffect" ""
"worldModel" ""
"worldModel1" ""
"worldModel10" ""
"worldModel11" ""
"worldModel12" ""
"worldModel13" ""
"worldModel14" ""
"worldModel15" ""
"worldModel2" ""
"worldModel3" ""
"worldModel4" ""
"worldModel5" ""
"worldModel6" ""
"worldModel7" ""
"worldModel8" ""
"worldModel9" ""
"worldShellEjectEffect" "fx\weapon\fx_shellejects_pistol.efx"
"worldShellEjectOffsetForward" "0"
"worldShellEjectOffsetRight" "0"
"worldShellEjectOffsetUp" "0"
"worldShellEjectRotationPitch" "0"
"worldShellEjectRotationRoll" "0"
"worldShellEjectRotationYaw" "0"
"yawConvergenceTime" "0"
}
}


any help into getting the dictunary.add to work would be much appeicated because i at a total loss to why its acting like this

thanks in advance elfenliedtopfan5

Continue reading...
 
Back
Top