Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


AnantaDas

Member Since 20 Jan 2013
Offline Last Active Jan 31 2013 01:23 PM

Topics I've Started

AngelScript "this"?

20 January 2013 - 08:16 AM

Hello, I've got a question about AngelScript. I need to pass a reference to a script class instance into C++ for future access, so I created a function and exported it to AScript using "void InitScriptInstance( ?&in )". It works fine but the problem is I don't know how to pass a reference to current object (like 'this' in C++) - when I try to write:

 

class MyClass
{
   MyClass()
   {
      InitScriptInstance( this );
   }
}

 

The program goes into an infinite loop. If I replace the 'this' with something else (like 5) it works well but this obviously isn't what I need. Anyone knows the correct syntax?

 

Thanks


PARTNERS