Jump to content
The simFlight Network Forums

Event.Cancel


Recommended Posts

Can a function be cancelled (with event.cancel) from within the same function (e.g. using an "if" statement, [if ipc.elapsedtime()>T then event.cancel("xxx") end]),

or it can only be cancelled from outside (some other point of the lua script containing it) ?

 

You can cancel anywhere. It won't affect the current execution, only the next time that event would have occurred.

 

Pete

Link to comment
Share on other sites

In a specific case, looked like it was not cancelled, but it is difficult to pinpoint it.

I will dig in some further.

 

Don't forget you can use the Trace/Log option on the logging page to do line-by-line tracking. It also logs each time the event check occurs. You'd need to reload the plug-in after enablng the logging.

 

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.