Jump to content
The simFlight Network Forums

Crash when calling macros from a lua script


dazz

Recommended Posts

I have this simple lua script:

if ipc.get("activeNav") == 1 then
	ipc.macro("MADDOG2: AP CRS1 INC")
else 
	ipc.macro("MADDOG2: AP CRS2 INC")
end
[/CODE]
 
where I call a macro everytime it's executed. This is mapped to a rotatory knob (AP CRS) that crashes the sim when continuously turn it for a few seconds.
It looks as if too many macro calls were overflowing the call stack or something, because it doesn't happen if I add a ipc.sleep(1000)
Ok, happens also with this test script without macros:
[code]
ipc.display(ipc.get("intDec"))
ipc.set("intDec", ipc.get("intDec") + 1)

I could very well be missing something obvious. Really need some sleep :)

Thanks

Edited by dazz
Link to comment
Share on other sites

This is mapped to a rotatory knob (AP CRS) that crashes the sim when continuously turn it for a few seconds.

I'm pretty sure that's caused by a bug which has been fixed in one of the many updates released this year. Please check the Download Links subforum and make sure your FSUIPC is more up to date.

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.