I've searched around the internet trying to figure out what %# does in the forms of lua or whatever, however I haven't been able to find a solid answer. What exactly does this do?
Ok I will go over % the modulus operator then the other one you mentioned. What it does is it returns the remainder of a division problem. Here is an example:
local numberExample = 5 % 2 print(numberExample) --> output is 1 because 5 /2 = 2 with a remainder of 1
the hashtag is a little more interesting. It will return the length of something. It can return the length of a string and a table and so on. Here is an example:
local tbl = {1, 4, 9, 2} print(#tbl) --> output is 4 because the table is four items long.
a really good answer on the modulus can be found here. I hope that I helped you out and have a great day scripting!
Locked by User#19524
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?