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 18 Aug 2011
Offline Last Active Private

Posts I've Made

In Topic: Array trailing comma

04 October 2014 - 07:08 PM

Why would you want that though?

I know why i would.

Not long ago i got a weird crash when loading bytecode containing funcdef array with extra comma. Nothing tried to access last element, couldn't reproduce it, happens only on linux version of application... I'd enable it just to make sure other scripters don't screwup anything - finding single comma in big codebase is not fun at all :]

In Topic: #define preprocessor directives from within Angelscript

09 September 2014 - 01:33 PM

You may want to take a look at preprocessor written years ago by Anthony Casteel. Can't see the anything linking to it on the page itself, but fast googling shows that it's still around. Other than #define and friends, you'll also get #include and skeleton for #pragma what should be enough even for bigger scripts.

In Topic: Unregister function?

08 June 2014 - 08:40 PM

Thanks, definitely will be useful smile.png

In Topic: funcdef inside shared interface; "interface already implement" warning

27 February 2013 - 03:55 AM

Another dark secrets of funcdefs found, sorry! ;) We call start() function and expect to reach end().
Let's start from crash in cfuncdef1_1::crashme().

If we change crashme() a bit, everything looks like it works without any problems (we can reach end()), but generated bytecode cannot be loaded (LoadByteCode() returns -1).
    void crashme()
        if( @this._events_ != null && @this._events_.f != null )
            funcdef1@ crash = this.events.f;
            crash( this );
And finally, different edit makes "GC cannot free an object of type '_builtin_function_', it is kept alive by the application." error show up.
cfuncdef1_1() { @this._events_ = null; }

In Topic: funcdef inside shared interface; "interface already implement" warning

25 February 2013 - 08:24 PM

Two modules with same code; both need to be loaded from bytecode or error won't show up.
funcdef void fdef();

shared interface iface
	fdef@ dummy();