ComputerCraft Forums

General => General => Topic started by: Metalhead on Aug 21, 2020, 11:20 PM

Title: Does anyone by chance still have SMT?
Post by: Metalhead on Aug 21, 2020, 11:20 PM
I'm trying to do stuff with modems (security is needed) and I stumbled across SMT (https://forums.computercraft.cc/index.php?topic=7)

this was listed on the Network Security section of the wiki. However this now is a 404 on github so I am unable to download it.

If anyone does have it please send a link
Title: Does anyone by chance still have SMT?
Post by: SquidDev on Aug 22, 2020, 07:10 AM
I've yoinked it off SC and put it on a gist: https://gist.github.com/SquidDev/2d38b97046ccf7fb6f96e7c8b94b1e0d. I'm afraid I can't remember what the licence is.

I hadn't realised that steamport had vanished - that's a shame, they had some neat stuff.
Title: Does anyone by chance still have SMT?
Post by: Metalhead on Aug 22, 2020, 03:58 PM
Do you by chance have the docs anywhere? I've attempted using it with the examples given in the old post but it doesn't seem to work. (Not sure if code changed or if it is due to the fact that I am using os.loadAPI rather than require since require doesn't seem to work)
Title: Does anyone by chance still have SMT?
Post by: SquidDev on Aug 22, 2020, 04:12 PM
I'm fairly sure it only works with require. What do you mean require doesn't work for you -  do you get an error?
Title: Does anyone by chance still have SMT?
Post by: Metalhead on Aug 22, 2020, 06:06 PM
I get an error telling me the module does not exist, despite me putting the exact path to it:
smt = require("../test/smt.lua")
Title: Does anyone by chance still have SMT?
Post by: SquidDev on Aug 22, 2020, 06:22 PM
Ahh. Require doesn't work on file paths (https://www.lua.org/manual/5.1/manual.html#pdf-require) - it takes package names instead. If you read the error message, you'll be able to see it's looking for files like `test/smt/lua` instead.

The easiest thing to do is probably just use dofile. It's a massive bodge, but should get you started at least.
Title: Does anyone by chance still have SMT?
Post by: osmarks on Sep 04, 2020, 02:54 PM
Hmm, I may have to update the network security page then.