Jump to content

How to require "socket.http" from a script?


SilentSierra

Recommended Posts

Hi there,

 

I have this piece of code that basically require a socket HTTP, but I received an error message that's the "require" doesn't exists.

 

local http = require("socket.http")
local ltn12 = require("ltn12")

 

I would like to know how to require this socket in DCS World environment?

 

PS: From this thread How to create statistics for your server

 

Best regards.


Edited by SilentSierra

CPU: AMD Ryzen 7 7800X3D MOBO: Asus ROG STRIX B650E-E MEM: Kingston FURY Renegade 64GB DDR5 5200MHz SSD: Kingstone Fury Renegade NVME PCIe 4.0 M.2 SSD 4TB GPU: ASUS ROG STRIX RTX 4090 OC CASE: Cooler Master TD500 Mesh WATER COOLER: Cooler Master Master Liquid ML360 Illusion HT: TrackIR 5 VR: HP Reverb G2 V2 HOTAS: TM HOTAS Warthog RUDDER: TPR Rudder Pedals GRIP: TM F/A-18C GRIP WHEELS: Logitech G27 OS: Win 11 Pro SIMS: DCS World, Falcon BMS, IL-2 Sturmovik, MSFS2020, Arma 3, Assetto Corsa.

Link to comment
Share on other sites

have you tried editing your MissionScripting.lua?

 

Look In

C:\Program Files\Eagle Dynamics\DCS World\Scripts

 

Edit MissionScripting.lua and comment out require or what ever else you might need.

do
--sanitizeModule('os')
--sanitizeModule('io')
--sanitizeModule('lfs')
--require = nil
loadlib = nil
end

Coming Soon...
The Fraternity Returns : https://thefraternitysim.com/
Link to comment
Share on other sites

Thanks man! You are a genius! I'm a web developer, I don't understand the DCS World script environment.

 

Now, I can send HTTP request to my Web API and create my statistics user interface like yours.

 

How do you get the current coordinates of aircrafts and objectives to plot into Google Maps?

 

Do you use scheduler to update for each minute the coordinates?

 

How to get the connected players? How to detect if they are loading SRS?

 

I'm sorry, it's too many questions.

 

Best regards.

Screen_190813_192312.thumb.png.8d3e232fb45f9b72019619d775cc91e2.png


Edited by SilentSierra

CPU: AMD Ryzen 7 7800X3D MOBO: Asus ROG STRIX B650E-E MEM: Kingston FURY Renegade 64GB DDR5 5200MHz SSD: Kingstone Fury Renegade NVME PCIe 4.0 M.2 SSD 4TB GPU: ASUS ROG STRIX RTX 4090 OC CASE: Cooler Master TD500 Mesh WATER COOLER: Cooler Master Master Liquid ML360 Illusion HT: TrackIR 5 VR: HP Reverb G2 V2 HOTAS: TM HOTAS Warthog RUDDER: TPR Rudder Pedals GRIP: TM F/A-18C GRIP WHEELS: Logitech G27 OS: Win 11 Pro SIMS: DCS World, Falcon BMS, IL-2 Sturmovik, MSFS2020, Arma 3, Assetto Corsa.

Link to comment
Share on other sites

im currently using Moose to compile all my data and using its scheduler feature to keep things updated. You can also use SLMOD which already has some really nice built-in features that will handle stat collection and I believe you can also see who is online.


Edited by ElementLT
Coming Soon...
The Fraternity Returns : https://thefraternitysim.com/
Link to comment
Share on other sites

Yeah, it's too much code to learn how to use.

 

Thanks, I'll patiently try to read all documentation about it.

CPU: AMD Ryzen 7 7800X3D MOBO: Asus ROG STRIX B650E-E MEM: Kingston FURY Renegade 64GB DDR5 5200MHz SSD: Kingstone Fury Renegade NVME PCIe 4.0 M.2 SSD 4TB GPU: ASUS ROG STRIX RTX 4090 OC CASE: Cooler Master TD500 Mesh WATER COOLER: Cooler Master Master Liquid ML360 Illusion HT: TrackIR 5 VR: HP Reverb G2 V2 HOTAS: TM HOTAS Warthog RUDDER: TPR Rudder Pedals GRIP: TM F/A-18C GRIP WHEELS: Logitech G27 OS: Win 11 Pro SIMS: DCS World, Falcon BMS, IL-2 Sturmovik, MSFS2020, Arma 3, Assetto Corsa.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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