Steve Johnson Posted March 23, 2011 Report Share 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 Quote Link to comment Share on other sites More sharing options...
Pete Dowson Posted March 23, 2011 Report Share 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 Quote Link to comment Share on other sites More sharing options...
Steve Johnson Posted March 26, 2011 Author Report Share Posted March 26, 2011 Hi Pete, I have applied the interim update and it is now working fine, Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.