That said Lennart Denninger discovered yesterday a bug when doing multiple assignments in one statement:
a = b = c;
If a, b, and c are registered objects with the assignment behaviour then they won't be assigned correctly.
I've already fixed this problem in WIP4, and I'll show you how to fix it here as well:
In the file as_scriptengine.cpp:
Method RegisterObjectBehaviour():
Add this code:
if( !isGlobal ) func.objectType = type.extendedType;
after this part (aprox. 70 lines into the function):
r = bld.ParseFunctionDeclaration(decl, &func); if( r < 0 ) return ConfigError(asINVALID_DECLARATION);
Method AddBehaviourFunction():
Add this code:
f->objectType = func.objectType;
after this part (aprox. 10 lines into the function):
asCScriptFunction *f = new asCScriptFunction;
[Edited by - WitchLord on August 31, 2004 8:44:03 AM]