Jump to content
The simFlight Network Forums

Can't get J41 LUA file to run


Recommended Posts

I think I copied and installed the Cold and Dark file correctly, but it will not run, and the log shows the following:

********* LUA: "J41 CD" Log [from FSUIPC version 4.53] *********

518812 System time = 08/01/2010 16:03:25, Simulator time = 16:00:21 (21:00Z)

518812 LUA: beginning "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\J41 CD.lua"

518812 *** LUA Error: ...am Files\Microsoft Games\Microsoft Flight Simulator X\Modules\J41 CD.lua:1: unexpected symbol near '{'

518812 LUA: ended "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X\Modules\J41 CD.lua"

518812 System time = 08/01/2010 16:03:25, Simulator time = 16:00:21 (21:00Z)

********* LUA execution terminated: Log Closed *********

I have been over every line until my eyes are crossed, and cannot find '{' or any obvious error.

I have tried mapping the script to both a button on the joystick and to a key combo to no avail.

Help?!

Justin Friedland

Link to comment
Share on other sites

I think I copied and installed the Cold and Dark file correctly, but it will not run, and the log shows the following:

********* LUA: "J41 CD" Log [from FSUIPC version 4.53] *********

Sorry, I cannot help you debug your Lua plugin without seeing it. However, the clue in in the error message in the log:

518812 *** LUA Error: ...am Files\Microsoft Games\Microsoft Flight Simulator X\Modules\J41 CD.lua:1: unexpected symbol near '{'

Line 1, the very first line of your "J41 CD.Lua" file is in error. Some spurious characters I expect. Show that line to me if you don't see the error. Or, better, just paste a copy of the file in a message here. I cannot help without information.

I have tried mapping the script to both a button on the joystick and to a key combo to no avail.

There's no point in changing any mapping. The Lua script is being run, as the log cleasrly shows, and if obviously failing on line 1 as it says. That's why there's an error message in the Log. The error message is there to tell you this and to show you where the error is.

Regards

Pete

Link to comment
Share on other sites

Pete,

You are tireless and I suppose there must be 4 of you.

At any rate, here are the first lines of code for the LUA

ipc.sleep(2000)

-- RIGHT Engine OFF

RSG = ipc.readLvar("L:RightEngStopSwitchGuard")

if RSG == 0 then

ipc.writeLvar("L:RightEngStopSwitchGuard", 1)

ipc.control(66587, 8010)

elseif RSG == 1 then

end

Darned if I can figure out where the error is.

Thanks,

Justin

Link to comment
Share on other sites

At any rate, here are the first lines of code for the LUA

There's no error there which would cause that error message.

What editor are you using for this file? Don't use Wordpad or any word processor -- they don't stick to plain ASCII. Use notepad or a simple text editor.

If you are still not sure what is wrong, ZIP the file itself and send it to me at petedowson@btconnect.com.

Regards

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.