Archive 19/01/2023.

[SOLVED] Loading a VectorBuffer in AngelScript

Mike

I’m trying to load a VectorBuffer using following code (AngelScript):

        VectorBuffer buffer;
        buffer.WriteString("some text");
        buffer.Seek(0);
        XMLFile@ xmlFile = XMLFile();
        xmlFile.Load(buffer);

I get a “No matching signatures to ‘XMLFile:Load(VectorBuffer)’” error.

cadaver

Exposing the Deserializer / Serializer class hierarchy is problematic in AngelScript because some of them are refcounted and some are not. This means that in many cases the load functions have been exposed to accept only a File handle. In this case I believe a manual overload for Resource::Load() with a vectorbuffer can be added.

Mike

Many thanks for the bindings. :slight_smile: