![]() |
|
Reading Client data - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196) +---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192) +---- Thread: Reading Client data (/showthread.php?tid=1650) |
- Nikolee - 02-23-2013 Hey im working on some tools for fun. I looked in the public source for the structure, can i use this? I need a bit start help bc i dont know really there to start ![]() atm ive tried this: public void load(string filename) { using (BinaryReader reader = new BinaryReader(File.Open(filename, FileMode.Open))) { reader.ReadInt32(); for (int i = 0; reader.BaseStream.Position < reader.BaseStream.Length; i++) { m_nAttack[i] = reader.ReadInt32(); // m_nAttack is int32 ? } } Console.WriteLine(m_nAttack + m_strName); } but it always gives 0 or some errors ![]() - luoo - 02-23-2013 reader.BaseStream.Position < reader.BaseStream.Length reader.ReadInt32(); Read 4 bytes and push the position + 4 So this for is wrong while (binaryReader.BaseStream.Position < binaryReader.BaseStream.Length) { int EventID = binaryReader.ReadInt32(); int EventEnable = binaryReader.ReadInt32(); } - Nikolee - 02-24-2013 reader.BaseStream.Position < reader.BaseStream.Length reader.ReadInt32(); Read 4 bytes and push the position + 4 So this for is wrong while (binaryReader.BaseStream.Position < binaryReader.BaseStream.Length) { int EventID = binaryReader.ReadInt32(); int EventEnable = binaryReader.ReadInt32(); } Thanks ive finished the RareOption editor. But from there i get the file structure? Or is it always int/byte[] ? - luoo - 02-24-2013 Not always. You can add me skype. phili--pp |