Steve Johnson Posted March 23, 2011 Report Posted March 23, 2011 Hi Pete, I have been trying to play a 2 second wav from a Lua script (it's for the stall test switch) and I am getting an error with the ipc.debug program on the line where I have used the sound.play. I have searched through the pdf manuals with the keyword sound but I have not been able to find anything. This is the code that is causing the problem, sound.play("c:\\sounds\\stall.wav") ipc.sleep(3000) The wav file is at this location: C:\sounds\stall.wav ipc.debug writes this to the log file: 2940448 *** LUA Error: ...es\Microsoft Flight Simulator X\Modules\MW_Panel.lua:29: attempt to index global 'sound' (a nil value) 2940448 LUA: ended "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Modules\MW_Panel.lua" 2940448 System time = 23/03/2011 20:07:31, Simulator time = 20:07:47 (20:07Z) ********* LUA execution terminated: Log Closed ********* As always, any help would be very much appreciated
Pete Dowson Posted March 23, 2011 Report Posted March 23, 2011 I have been trying to play a 2 second wav from a Lua script (it's for the stall test switch) and I am getting an error with the ipc.debug program on the line where I have used the sound.play. I have searched through the pdf manuals with the keyword sound but I have not been able to find anything. ... 2940448 *** LUA Error: ...es\Microsoft Flight Simulator X\Modules\MW_Panel.lua:29: attempt to index global 'sound' (a nil value) That simply means that the "sound" library isn't defined (i.e. it is "nil"). I think you must be using a version of FSUIPC before the "sound" library was added. If you look at the headings of the Lua library documents you are referring to, don't you see an FSUIPC version number? Try the interim FSUIPC update available in the Download Links subforum. Regards Pete
Steve Johnson Posted March 26, 2011 Author Report Posted March 26, 2011 Hi Pete, I have applied the interim update and it is now working fine, Thanks for your help.
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