Jump to content

How can you load a third party lua dll for use in a GameGUI (or anywhere else)


Drexx

Recommended Posts

I am trying to load the luasql module so that I can write a proper frontend website and have communications between website and server, also log all the events in the database.

 

I am using a 64bit compiled version of luasql (for lua 5.1)

 

The files to access the example are here:

https://www.dropbox.com/sh/hjk9h2c4j6elsfw/AAABBJM5cTUicb5hlvF_R8lqa?dl=0

 

You put the luasql folder in DCS\bin (so it can get access to the library)

and run the dbTestGameGUI.lua from the DCS\bin

 

lua dbTestGameGUI.lua

 

C:\Program Files\Eagle Dynamics\DCS World\bin>lua "c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua"
Event: HAHAHA, Time: 2016-11-04 03:59:20
Event: YESSSSS, Time: 2016-11-04 03:59:20
Event: WEEEENER, Time: 2016-11-04 04:18:20
Event: DCS WROTE TO SERVER!, Time: 2016-11-04 13:34:22

 

it writes to the database and reads from it, this WORKS!

 

but with luarun.exe

 

luarun dbTestGameGUI.lua

C:\Program Files\Eagle Dynamics\DCS World\bin>luarun "c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua"
can't load c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua: [string "c:\Users\andre\Saved Games\DCS\Scripts\DatabaseTestGameGUI.lua"]:2: attempt to index global 'luasql' (a nil value)

 

it has trouble

 

Just an example of loading an external module would be fun or an explanation of the limitations of DCS + GameGUI + loading external modules. Lua.exe runs this code perfectly so theres definitely a different here somewhere

 

Being able to load an external module from GameGUI can open our server up to a TON of possiblities!

 

Thanks!

 

-Drex

-=16AGR=- US East Dynamic Caucasus

Developer of DDCS MP Engine, dynamicdcs.com

https://forums.eagle.ru/showthread.php?t=208608

Link to comment
Share on other sites

  • 1 year later...

Probably not as I was told ed is very restrictive on what dcs can and cannot do

BlackeyCole 20years usaf

XP-11. Dcs 2.5OB

Acer predator laptop/ i7 7720, 2.4ghz, 32 gb ddr4 ram, 500gb ssd,1tb hdd,nvidia 1080 8gb vram

 

 

New FlightSim Blog at https://blackeysblog.wordpress.com. Go visit it and leave me feedback and or comments so I can make it better. A new post every Friday.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...