registerOutputEvent(fxDTSBrick,"Delete");function fxDTSBrick::Delete(%this){ %this.delete();}
SimObject::delete - wrong number of arguments.usage: obj.delete()
You're doing it wrong.You're overwriting delete, which would call itself, which could keep calling itself.
Change the function name to anything except delete