DaveSCUSA Posted February 22 Report Posted February 22 I keep getting this error: ********* LUA: "MSFS_Lua" Log [from FSUIPC version 7.4.1] ********* 157562 System time = 22/02/2024 18:32:10, Simulator time = 18:32:08 (23:32Z) 157562 LUA: beginning "C:\FSUIPC7\MSFS_Lua.lua" 157562 *** LUA Error: C:\FSUIPC7\MSFS_Lua.lua:15: '=' expected near 'else' 157593 >>> Thread forced exit (ipc.exit or os.exit) <<< 157593 System time = 22/02/2024 18:32:10, Simulator time = 18:32:08 (23:32Z) ********* LUA execution terminated: Log Closed ********* For the life of me, I cannot seem to find the correction. I've looked at the error online (it stated the if statement was in error ????). I've used aircraft == typeac1, aircraft ~= typeac1 or aircraft == "DA62". Please help, you are the only one that I know to ask. I'm using this module to communicate different aircraft controls and instruments to use keypads, Alpha and Bravo devices. Addon aircraft are not consistent with the use of controls, events and input events. MSFS_Lua.lua
John Dowson Posted February 23 Report Posted February 23 On line 14 (and 18) you have ipc.exit when it should be ipc.exit() It is a function and you are missing the brackets, so it is being interpreted as a variable, and thereofore an assignment is expected, hence the error (i,e, as its a variable, it needs to be followed by an '=' sign, but it is followed by 'else' instead).
DaveSCUSA Posted February 23 Author Report Posted February 23 Thank you. Sometimes very confusing and not obvious. Still becoming used to Lua.
John Dowson Posted February 23 Report Posted February 23 Just now, DaveSCUSA said: Sometimes very confusing and not obvious. Still becoming used to Lua. When you get a lua error, the line number is given - just remember to check the previous line as well as the one given, as the error may be there (or even before!).
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