Sign in to follow this  
FDsagizi

CreateUninitializedScriptObject return null for type of array<int>

Recommended Posts

FDsagizi    514
hi [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]

[CODE]
int type_id = GetTypeIdByDecl( "array<int>" );

void *v1 = CreateUninitializedScriptObject( type_id );

void * v2 = CreateScriptObject( type_id );

v1 == nullptr; :(
v2 is ok!


[/CODE] Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites
TechRogue    722
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
WitchLord    4678
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this