View Single Post
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-14-2015 , 19:41   Re: Dynamic Objects and Properties
Reply With Quote #15

Quote:
L 09/14/2015 - 18:11:29: [SM] Native "ThrowNativeError" reported: Unable to access dynamic handle 0
Looks like it's not initialised.

Code:
Dynamic someobject = Dynamic();
You then need to share someobject. Internally someobject is an integer and represents the internal index for the collection array. The best idea is to pass it through a native.

Code:
Dynamic someobject = view_as<Dynamic>(Native_GetDynamicObject());
You would return someobject in the native like so.

Code:
return view_as<int>(someobject);
If you still encounter problems with this advise feel free to post code for both plugins.
__________________
Neuro Toxin is offline