Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now
- - - - -

CreateUninitializedScriptObject return null for type of array<int>

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 FDsagizi   Members   

514
Like
0Likes
Like

Posted 28 September 2012 - 11:08 PM

hi Posted Image

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

void *v1 = CreateUninitializedScriptObject( type_id );

void * v2 = CreateScriptObject( type_id );

v1 == nullptr; <img src='http://public.gamedev.net//public/style_emoticons/<#EMO_DIR#>/sad.png' class='bbc_emoticon' alt=':(' />
v2 is ok!



Edited by Andreas Jonsson, 03 October 2012 - 06:53 PM.


#2 Jake Albano   Members   

722
Like
1Likes
Like

Posted 30 September 2012 - 09:03 AM

CreateUninitializedScriptObject only works for script classes.

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

#3 Andreas Jonsson   Moderators   

4624
Like
1Likes
Like

Posted 03 October 2012 - 06:53 PM

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.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#4 FDsagizi   Members   

514
Like
0Likes
Like

Posted 03 October 2012 - 09:39 PM

Ok! I do to modification serealizerPosted Image




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.