zheng.guan Posted October 22, 2014 Posted October 22, 2014 Hi , Thank you for reading. Our team is developing a multiplayer combat game using Unigine, it would be seem like the WarGame. Our question is : Uncontrolled Bytes Displacement Error! Description:We try to record our plane's data into a txt file via the File Class. But we find that when we use the function writeVec3(vec3 vec) \ writeInt(int number) and writeLong(long value) ,the record recorded by Unigine will be uncontrolled bytes displacement. For example we write int data into the file from 0 to 100, error will begin when we write 10! You can see from the attach files: The ' 0D ' is extra. Also, the extra data will increase when data grows. Really look forward to your reply. Wish the best! Rebecca.
ulf.schroeter Posted October 22, 2014 Posted October 22, 2014 have you opened the file in binary mode e.g. by specifying "wb" ?
zheng.guan Posted October 22, 2014 Author Posted October 22, 2014 have you opened the file in binary mode e.g. by specifying "wb" ? :mellow:The Help document has no such mode. We already got reply from the support of Unigine. They suggested "wb" and "rb". Thank you~ :)
ulf.schroeter Posted October 22, 2014 Posted October 22, 2014 https://developer.unigine.com/en/docs/1.0/scripting/core/class.file#open_string_string_int There are some hints, but indeed not very clear.
Recommended Posts