So I was trying to make a bit of a debugging log for a plugin of mine which has had issues running on a clanmate's computer. While testing, I forgot that io.open() was sandboxed. Is there any way to have a script check to see if a function is sandboxed before attempting to access the function? I would much rather check before having a bunch of errors pop up on the screen.
The functions are actually different:
print( io.open )
print( io.write )
print( io.read )
function: 00DE55F8
function: 00DE5490
function: 00DE6060
Would it be possible to have a sandboxed() function which the other functions could reference if they are sandboxed, rather than having a new function created each time doing the same exact thing?
a = function() end
b = a
print( a.."\n"..b )
function: 013A84A0
function: 013A84A0
This way we can check if a function is sandboxed with a quick comparison, or a world.sandboxed( foo ) function returning true/false. I'm hoping this exists already, and I just do not know of it yet.
The functions are actually different:
print( io.open )
print( io.write )
print( io.read )
function: 00DE55F8
function: 00DE5490
function: 00DE6060
Would it be possible to have a sandboxed() function which the other functions could reference if they are sandboxed, rather than having a new function created each time doing the same exact thing?
a = function() end
b = a
print( a.."\n"..b )
function: 013A84A0
function: 013A84A0
This way we can check if a function is sandboxed with a quick comparison, or a world.sandboxed( foo ) function returning true/false. I'm hoping this exists already, and I just do not know of it yet.