Mike
Are the AngelScript bindings for writing/reading a VectorBuffer in Serializer and Deserializer classes missing? (or is it performed otherwise?)
Are the AngelScript bindings for writing/reading a VectorBuffer in Serializer and Deserializer classes missing? (or is it performed otherwise?)
You can write and read an array of uint8’s, but it’s not quite the same thing. Should be easy to add.
Has been added to master. It’s the user’s responsibility to know the size of the data, for example:
VectorBuffer test;
for (int i = 0; i < 10; ++i)
test.WriteString("Test" + String(i));
File outFile("Test.bin", FILE_WRITE);
outFile.WriteUInt(test.size);
outFile.WriteVectorBuffer(test);
outFile.Close();
File inFile("Test.bin");
uint size = inFile.ReadUInt();
VectorBuffer test2 = inFile.ReadVectorBuffer(size);
inFile.Close();
while(!test2.eof)
Print(test2.ReadString());
Awesome! Works great, many thanks Cadaver