Reputation: 55
I'm trying to make an API that encrypts strings in ComputerCraft. However, i'm not sure how I would make have the encryption function return the encrypted text. How would I have a function return something?
Upvotes: 0
Views: 222
Reputation:
The syntax to make a function in lua is
function encrypt(text)
[you encrypting algorithm here]
return encrypteddata
end
Here are the documentation for the Strings in Lua (you'll need it to encrypt your text): https://www.tutorialspoint.com/lua/lua_strings.htm
Upvotes: 0