• Advertisement
Sign in to follow this  

CreateUninitializedScriptObject return null for type of array<int>

This topic is 1936 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi smile.png


int type_id = GetTypeIdByDecl( "array<int>" );

void *v1 = CreateUninitializedScriptObject( type_id );

void * v2 = CreateScriptObject( type_id );

v1 == nullptr; :(
v2 is ok!


Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites
Advertisement
CreateUninitializedScriptObject only works for script classes.

http://www.angelcode.com/angelscript/sdk/docs/manual/classas_i_script_engine.html#a8fe709ccb1d13977afb35f8726f380fb

Share this post


Link to post
Share on other sites
Jake's correct. CreateUninitializedScriptObject only works for script classes, and not for registered types. AngelScript wouldn't know how to safely create an uninitialized instance of a registered type.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement