Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


- - - - -

CreateUninitializedScriptObject return null for type of array<int>


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   -  Reputation: 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.


Sponsor:

#2 Jake Albano   Members   -  Reputation: 646

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   -  Reputation: 3415

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   -  Reputation: 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.



PARTNERS