So I made a plugin that works fine without lua socket, but also has some added functionality if you have lua socket. The problem is that if you don't have lua socket, require will spam you with the 'not found' error. I feel like there should be a simple way to check for the existence of an add on like lua socket before you require it, but I can't seem to figure it out. I tried the obvious,
if require("socket.http") then http = require("socket.http") end
but that still generates the error. Anyone have some insight?
if require("socket.http") then http = require("socket.http") end
but that still generates the error. Anyone have some insight?