Jump to content
The simFlight Network Forums

Crash when calling macros from a lua script


dazz
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.