Author Topic: FSO and lua socket  (Read 2615 times)

0 Members and 1 Guest are viewing this topic.

Hello, is FSO compatible with the lua socket library currently?

If I try to use a function in the lib with it installed in my FS folder, I get the error that socket\core.dll is not a valid win32 app. I've tried with several version of the dll and always get the same error. Has anyone already tried working with this?


Offline z64555

  • 210
  • Self-proclaimed controls expert
    • Minecraft
    • Steam
I don't believe the lua interpreter in FSO was designed to work with 3rd party libraries, much less one that works with internet connectivity.

If you want to take a look, the C source files are within ./code/scripting
Secure the Source, Contain the Code, Protect the Project

funtapaz: Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Juche.
z64555: s/J/Do
BotenAlfred: <funtapaz> Hunchon University biologists prove mankind is evolving to new, higher form of life, known as Homopithecus Douche.

Well that's what I was thinking too after reading a bit more on the net, as it's an integrated interpreter if I want the functions I need to create my own exe with integrated library... Probably to much hassle for what I want to do ^^

In fact I don't need all the functions I would just need to be able to send and receive strings and float variables from the client to the host but for now it's not doable I think... Btw there's not much MP going so that's not very relevant, but that would be nice.


Offline m!m

  • 211
LuaSocket wouldn't really help you with that since it can't access the socket that FSO is using form communicating with the clients. You would need a specialized FSO Lua API system which would allow to send and receive arbitrary Lua data over the same channel FSO is already using. It's not impossible to do that but it would require a coder who has experience with Lua and with the Network code. You could open a GitHub issue requesting this feature so that we can track its progress there.

Well why not, thanks for the suggestion m!m. I'm not myself experimented with that so well I'll post that on github and see if someone is able to do that for a future release of FSO (3.8.2 or 3.8.4 who knows ^^)!

Maybe this is not the right answer for your question, but ...
I still use luasocket and some LUA-scripts to send extracted informations about the game to another pc in the same network. At this PC the information is displayed. If this is what you looking for, search in the forum for "auxil... instruments" from PoDo.
My fs2_open version is .3.7.4. ...
If you need more information PM or repley.