Jump to content
The simFlight Network Forums

Can't figure out Lua Error


DrDave-

Recommended Posts

7 hours ago, DrDave- said:

I can't for the life of me figure out why.

I took a look at your Lua script and think you have the following syntax errors:

1. On Notepad++ lines 62, 66, 83, and 87 the ipc.writeLvar statements like this: ipc.writeLvar(FSUIPC_C510_Ignition_1", 1) apparently have the wrong type of opening quote character ( a curly quote instead of a straight quote? ) before FSUIPC_. Use the same type of straight quote character as you use for the closing quote after the _1. The similar writeLvar statements on lines 156, 161, 179 and 183 seem to be OK.

2. Line 250:  Lua file path syntax requires the statement ipc.runlua("C:\FSUIPC7\2-loglvars.lua") needs to use double back slashes ( \\ ) like this: ipc.runlua("C:\\FSUIPC7\\2-loglvars.lua"). I think a single back slash in Lua is reserved for escape characters.

3. Your local function Check_N1_S1() is missing an end statement. You need one end to close the function, one for the while do , and one for the if statement.

Good luck,

Al

  • Like 1
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.