what does offset point to in GetProperty

Started by
1 comment, last by izackp 11 years, 2 months ago

so for get property in the asScriptObject class:

GetProperty(asUINT index, const char **name, int *typeId = 0, bool *isPrivate = 0, int *offset = 0, bool *isReference = 0, asDWORD *accessMask = 0);

It assigns an offset which I assume is pointing to the data for that property, but i can't exactly tell what it is pointing to. Is it the actual raw data or some sort of angelscript wrapper?

What I'm trying to accomplish is assigning to a angelscript class's members. I need to be able to assign values (ints, ect) and references to other script objects.

Any help would be greatly appreciated smile.png

Advertisement

The offset points to the location within the object where the property is. If isReference is true, the property is stored as a pointer to the actual property. In this case you'll need to deference the pointer after adding the offset.

It may be easier to use asIScriptObject::GetAddressOfProperty() instead of asIObjectType::GetProperty.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Awesome I didn't even see that function. Thanks.

This topic is closed to new replies.

Advertisement