AndyHill Posted December 14, 2008 Share Posted December 14, 2008 I've been doing some testing and was wondering if there are some bugs in the system or if it's just me, but some export functions don't seem to work. For example altitude exports, bank angle and true airspeed seem to work, but indicated airspeed, slip ball position and vertical velocity return only nil values. The config file has "true" in it to allow export, I've tested mostly in singleplayer mode and I have the Russian download version. Any ideas? My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/ Link to comment Share on other sites More sharing options...
FreemanRU Posted December 17, 2008 Share Posted December 17, 2008 http://forums.eagle.ru/attachment.php?attachmentid=22355&d=1228849529 It's work. New export.lua from dev. 1 Всё сказанное автором - вымесел, и не может быть использовано как доказательство в суде. Мой блог | My blog Link to comment Share on other sites More sharing options...
AndyHill Posted December 17, 2008 Author Share Posted December 17, 2008 Thank you, I'll try the new file ASAP. My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/ Link to comment Share on other sites More sharing options...
AndyHill Posted December 23, 2008 Author Share Posted December 23, 2008 Ok, the new functionalities seem to work pretty well in single player, but in multi I get error message Dispatcher::Can't execute Lua file ./Config/Export/Export.lua - ./Config/Export/Export.lua:79: attempt to call global 'GetDevice' (a nil value) EnableExportScript = true in the Configlua file. Anyway, I've had a look at the new export file and things look very promising indeed. There are many interesting and useful new export options, ED really seems to care about us crazy people building cockpit stuff. My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/ Link to comment Share on other sites More sharing options...
PA-Skippy Posted December 25, 2008 Share Posted December 25, 2008 Hello, I wrote a message in an other forum (dedicated in russian language) I need an help regarding the export.lua and the socket using. there is an error as soon as I write the buffer. I want to use the socket. I developped a mod for the keyboard G15 and his LCD screen. http://sebcanaud.free.fr/Perso/LOCKO...LockonV1.3.zip (my job) Under lockon, I get informations and display them on the G15. I want to do the same job with BS. But I have this error very simple export.lua file Export.lua ------------------------------------ function LuaExportStart() package.path = package.path..";.\\LuaSocket\\?.lua" package.cpath = package.cpath..";.\\LuaSocket\\?.dll" socket = require("socket") host = host or "localhost" port = port or 6060 c = socket.try(socket.connect(host, port)) -- connect to the listener socket c:setoption("tcp-nodelay",true) -- set immediate transmission mode end function LuaExportAfterNextFrame() local h = LoGetAltitudeAboveSeaLevel() socket.try(c:send(string.format("h = %f\n",h))) -- line 131 end I execute the game and I have that error on the log file and nothing on the socket. Error.log ----------------------------------- Lua::Config::call error LuaExportStart:(null) Lua::Config::call error LuaExportAfterNextFrame:./Config/Export/Export.lua:131: attempt to index global 'c' (a nil value) Do you have an idea please Regards Seb Link to comment Share on other sites More sharing options...
FreemanRU Posted December 27, 2008 Share Posted December 27, 2008 'c' is nil if connection fail. Check your application - it's listening on UDP port, may be more "best practice" is use TCP port (i'm use TCP instead of UDP)? UDP 0.0.0.0:6060 *:* 137096 Всё сказанное автором - вымесел, и не может быть использовано как доказательство в суде. Мой блог | My blog Link to comment Share on other sites More sharing options...
PA-Skippy Posted December 27, 2008 Share Posted December 27, 2008 Very good idea, i have to check as soon as I'm back home To be honest I dont remember if i use tcp or udp perhaps udp. but that means BS needs to have an other application TCP to works? Link to comment Share on other sites More sharing options...
FreemanRU Posted December 28, 2008 Share Posted December 28, 2008 but that means BS needs to have an other application TCP to works? not quite understand the question... BS require TCP-listening application (aka socket-server) to communicate via socket. In this case BS - client, your application - server. Всё сказанное автором - вымесел, и не может быть использовано как доказательство в суде. Мой блог | My blog Link to comment Share on other sites More sharing options...
PA-Skippy Posted January 2, 2009 Share Posted January 2, 2009 BS require TCP-listening application (aka socket-server) to communicate via socket. In this case BS - client, your application - server. hello, I understood my mistake. As soon as I m back home I will test a TCP socket. For LO I developped a UDP socket based on WinSock32 But why I need to be the server ? not the client? I never developed any thing using TCP and I m not very good in socket. I founded a example using Winsock32 to modify my sources. But I have to use "Server" example? Link to comment Share on other sites More sharing options...
FreemanRU Posted January 2, 2009 Share Posted January 2, 2009 For LO I developped a UDP socket based on WinSock32. But why I need to be the server ? not the client? IMHO - it's easy. In my case. If you make a server in Lua easier than WinSock - do it in Lua Всё сказанное автором - вымесел, и не может быть использовано как доказательство в суде. Мой блог | My blog Link to comment Share on other sites More sharing options...
PA-Skippy Posted January 5, 2009 Share Posted January 5, 2009 Hi, If the Export.lua Send informations, why I need to be a server not a client? thx Link to comment Share on other sites More sharing options...
FreemanRU Posted January 6, 2009 Share Posted January 6, 2009 Send or Receive - no matters. When you start browser and connect to web-server you send "request"-message, and web-server is response. In this case you browser is client, even if it send information. In case of Export.lua this is not a axiom. It's only your choice - creating client or server. Do it as you best. Всё сказанное автором - вымесел, и не может быть использовано как доказательство в суде. Мой блог | My blog Link to comment Share on other sites More sharing options...
gofrm76 Posted November 19, 2010 Share Posted November 19, 2010 (edited) who is the server and who is the client is a matter of which program connects to the other and which program is listening for connections. in this case your program has to be startet first to listen for connections and DCS will connect to your program when the sim starts (at least in case you use the socket:connect()-example in the export.lua). that's why DCS is the client and your program is the server. no matter in which direction most of the data is transmitted. Edited November 19, 2010 by gofrm76 AV-8B | A-10C | A-10C II | A-4E | F-5E | F-14B | F-16C | F/A-18C | M-2000C | UH-1H | BS2 | Mig-21bis | L-39 | F-86F | P-47D | P-51D | BF 109 | Spitfire | FC3 | SC | CA Intel® Core™ i7-7700K | MSI 1080 GTX Gaming | 32 GB 2400-DDR4 RAM | Asus Prime Z270-A | 50“ UHD LG Monitor | Windows 10 Pro TM Hotas Warthog (DSE Slew Upgrade) | TM F/A-18 Stick | TM Hotas Cougar (FSSB) | TM Cougar MFDs | Fanatec CSL Elite Pedals | Oculus Rift CV1 | TrackIR 4 Link to comment Share on other sites More sharing options...
Recommended Posts