abax2000 Posted September 25, 2013 Report Posted September 25, 2013 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) ?
Pete Dowson Posted September 25, 2013 Report Posted September 25, 2013 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
abax2000 Posted September 25, 2013 Author Report Posted September 25, 2013 In a specific case, looked like it was not cancelled, but it is difficult to pinpoint it. I will dig in some further. Thnx Pete.
Pete Dowson Posted September 25, 2013 Report Posted September 25, 2013 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
abax2000 Posted September 25, 2013 Author Report Posted September 25, 2013 Mea culpa. There is a logic mistake in my code (in some nested if's). But then again, very useful to come in contact with you; I had forgotten about the Trace/Log facility. Thanks again...and sorry about that.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now