Does anyone by chance still have SMT?

Started by Metalhead, Aug 21, 2020, 11:20 pm

Previous topic - Next topic

Metalhead

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

SquidDev

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.
GitHub | CC:Tweaked: A ComputerCraft fork | Plethora: A peripheral mod

Metalhead

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)

SquidDev

I'm fairly sure it only works with require. What do you mean require doesn't work for you -  do you get an error?
GitHub | CC:Tweaked: A ComputerCraft fork | Plethora: A peripheral mod

Metalhead

I get an error telling me the module does not exist, despite me putting the exact path to it:
Code Select
smt = require("../test/smt.lua")

SquidDev

Ahh. Require doesn't work on file paths - 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.
GitHub | CC:Tweaked: A ComputerCraft fork | Plethora: A peripheral mod

osmarks

Hmm, I may have to update the network security page then.