Hi JCL,

I use physx in my game so I read in the manual that physX_destroy(); needs to be called when the application is closed. Now normally when using physX_open();, on_exit is automatically set to physX_destroy(); and the application closes without error messages.
However, if I want to set my own function for on_exit it gives physx error message when closing the application even when it contains physX_destroy();. E.g. like this:

Code:
function exit_event () {
	physX_destroy();
  beep();
}

function main () {
  ...
  physX_open();
  ...
  on_exit = exit_event;
}