Take the %e out completly.
Like this:
package test
{
function fxDTSbrick::Plant(%brick)
{
%e = Parent::Plant(%brick);
MessageAll('', "Hey");
}
};
activatepackage(test);
Please don't post if you don't know what you're doing. This will cause the function to return "Hey" every time it is called. If you're going to take out the if statement you must do this:
package test
{
function fxDTSbrick::Plant(%brick)
{
%e = Parent::Plant(%brick);
MessageAll('', "Hey");
return %e;
}
};
activatepackage(test);
The reason I'm making a big deal of it is .plant(); returns a number value for the error, which many mods probably depend on. For example
if(%this.plant() == 3)
messageClient(%client,'',"That brick's floating!");
Defaultly, if the brick was floating it would return 3, and that check would work. With your code, it would return "Hey". I don't believe "Hey" is equal to three, even if the brick was floating.
Also; Cry:
Also, I think you have to return the parent. Like this
package test
{
function fxDTSbrick::Plant(%brick)
{
return Parent::Plant(%brick);
MessageAll('', "Hey");
}
};
activatepackage(test);
return; skips all the rest of the function, so that wouldn't work at all. You're right about returning the parent, but you'd have to put it below everything like I noted earlier.