I am wondering if anyone can help me. I have been racking my brain most of today trying to figure this out. I am creating a save editor with C#. I made one before in vb, but I am switching languages, and not fully understanding what I am doing wrong.
I am using packageio, and I am using the following code to read:
This code works fine for reading the offsets. However, when I go to code the writing part, I am having issues. This first part works fine:Code:reader.Position = PosEXP; EXP = reader.ReadInt32(); reader.Position = PosLV; LV = reader.ReadByte(); reader.Position = PosHP HP = reader.ReadInt16();
But when I try to write wither the LV or HP, I get an error when trying to WriteByte and WriteInt16:Code:writer.Position = PosEXP; writer.WriteInt32(EXP, Endian.Little);
I have tried Int16 with the Endian.Little part as well, and I keep getting errors. Does anyone know what my problem is? I had the same issue in my vb editor, and ended up using StreamWriter for those types of bytes, but I would like to stick with packageio this time around.Code:writer.Position = PosLV; writer.WriteByte(LV); writer.Position = HP; writer.WriteInt16(HP);
Thanks in advance for any assistance that can be given.