Jump to content

[SOLVED] Uncontrolled Bytes Displacement Error


photo

Recommended Posts

Posted

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.

post-1403-0-45221700-1413947592_thumb.jpg

Posted

have you opened the file in binary mode e.g. by specifying "wb" ?

Posted

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~ :)

×
×
  • Create New...