# AngelScript 2.26.0 is out

## Recommended Posts

TechRogue    722

register class methods as global functions without the need for wrappers.

I like the sound of that! Does this just mean we can use asMETHOD() instead of asFUNCTION() when registering global functions? That's going to make my life a lot easier.

Initialization at declaration is another thing I've been looking forward to. Thanks as always for all your work. :)

##### Share on other sites
andrew1b    229

It is nice to see companies like Frictional games contributing to the development of AngelScript.

##### Share on other sites
WitchLord    4677

@Jake,

Yes, to register a class method (not static) as global function, you will use asMETHOD. In order for it to work the object pointer must also be informed at registration.

Example:

Object obj;
engine->RegisterGlobalFunction("void func()", asMETHOD(Object, Func), asCALL_THISCALL_ASGLOBAL, &obj);


@André,

It is. It would appear that smaller independent developers that manages to get success are much more likely to support open source projects, than the larger developers that have more regular successes. My guess is that it is because these smaller developers are much more likely to know how it is to be short of funds, and thus more likely to sympathize with other small independent developers.

Edited by Andreas Jonsson

##### Share on other sites
saejox    714

Thank you Frictional Games and Thank you Andreas Jonsson.

##### Share on other sites
ruphert    209

It seems the new version doesn't compile on Mac OSX (tested with 2 different systems):

c++ -g -Wall -fPIC -arch i386 -arch x86_64 -o obj/as_atomic.o -c ../../source/as_atomic.cpp
../../source/as_atomic.cpp:149: error: prototype for 'int asCAtomic::atomicDec(int&)' does not match any in class 'asCAtomic'
../../source/as_atomic.cpp:61: error: candidate is: asDWORD asCAtomic::atomicDec()
../../source/as_atomic.cpp:149: error: prototype for 'int asCAtomic::atomicDec(int&)' does not match any in class 'asCAtomic'
../../source/as_atomic.cpp:61: error: candidate is: asDWORD asCAtomic::atomicDec()
lipo: can't figure out the architecture type of: /var/tmp//ccdlDTNp.out

-EDIT-

Fixed!

Seemed like a typo at line 149 in as_atomic.cpp, should be:

int asAtomicDec(int &value)

Edited by thd.MM

##### Share on other sites
WitchLord    4677

Thanks. I'll have this fixed.

 Checked in to revision 1546.

Edited by Andreas Jonsson

##### Share on other sites
BClarenbach    130

* CScriptBuilder::AddSectionFromMemory() now requires a name and an optional length for the buffer in case it is not null terminated (Thanks Paril101)

was a dangerous change because it swaps the order of parameters but because of the new default parameter, its not obvious when you update. :)

##### Share on other sites
WitchLord    4677

Yes, I had another user reporting problem because of that too. Sorry about that.

##### Share on other sites
FDsagizi    514

Thank you Frictional Games and Thank you Andreas Jonsson.

##### Share on other sites
FDsagizi    514

The major new enhancement in this version is the support for initializing script class members directly in the declaration.

Using it for 2 days and it is very cool! I'm happy!