Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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
      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?