In the latest V3.2RC it would appear that it's not permitted to define extender functions in a module. Doing so produces an error as shown in the example below.
*** Module Header ***
import function FunctionName(this *Character);
*** Module Script ***
function FunctionName(this *Character) {
}
*** Compiler Message ***
Failed to save room room0.crm; details below
BluTemplate.ash(125): Error (line 125): 'this' must be followed by a struct name
I thought we used to be able to do this but I may be mis-remembering. Could someone verify if this is the correct operation or if it's a bug.
Try is with this Character* ? That's how the example for extender functions is written in the manual.
That's how I have it:
Quote
function FadeObject(this Object*, FadeDirection fdDir, String sSeconds)
{
...
}
Thanks guys. I had looked at the example in the help but didn't see the difference... I feel so stupid. :=