of     2   
chevron_rightchevron_rightchevron_right

Kyngsilver
#16009024Thursday, October 29, 2009 7:51 PM GMT

#,I keep seeing it yet i dont no what it does eg. for p = 1, #modelChildList do -- Make the player visible if (modelChildList[p].className == "Part") then -- Only work on bricks modelChildList[p].Transparency = 0 -- Solid end end If anyone could give me a reference id be happy... :)
Prehistoricman
#16009089Thursday, October 29, 2009 7:52 PM GMT

It means ammout of. Like a = {1,1,1,1,1,1,1,1,1,1,1} print(#a) would print the ammount of things in table a.
Kyngsilver
#16009147Thursday, October 29, 2009 7:54 PM GMT

Thanks
trappingnoobs
#16009511Thursday, October 29, 2009 8:02 PM GMT

lol = "mah boi" # = "number".. lol ..", ", number" print(#) should print: number mah boi, number
Prehistoricman
#16009574Thursday, October 29, 2009 8:03 PM GMT

Errr...that is useless.
Kyngsilver
#16010962Thursday, October 29, 2009 8:36 PM GMT

-_-'
sdfgw
Top 50 Poster
#16011144Thursday, October 29, 2009 8:40 PM GMT

Works for strings aswell a = "Ohai" print(#a) --> 4
RightLegRed
#16011190Thursday, October 29, 2009 8:41 PM GMT

I prefer string.len for strings.
sdfgw
Top 50 Poster
#16011261Thursday, October 29, 2009 8:43 PM GMT

I'm the lazy kind, I can never be asked to fire a whole function for it :P
RightLegRed
#16011282Thursday, October 29, 2009 8:43 PM GMT

I wuv strings.
sdfgw
Top 50 Poster
#16011451Thursday, October 29, 2009 8:47 PM GMT

Strings r win. :P Check this out, my most 1337 string script EVA _G.limit = function (num, lim) if num >= lim + 1 then num = limit(num-lim, lim) elseif num <= 0 then num = limit(num+lim, lim) end return num end _G.cipher = { alphabet = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}, alphabetTo = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}, number = function (let) for i = 1,#cipher.alphabet do if cipher.alphabet[i] == string.upper(let) then print("Converted " .. let .. " to " .. tostring(i)) return i end end end, letter = function (num) let = cipher.alphabetTo[num] print("Converted " .. tostring(num) .. " to " .. let) return let end, shift = function (let, key) print("Shifting " .. let .. " and " .. key) p = cipher.number(let) if (p~=nil) then num = p+cipher.number(key)-1 lim = limit(num, #cipher.alphabet) return cipher.letter(lim) end end, antishift = function (let, key) print("Antishifting " .. let .. " and " .. key) p = cipher.number(let) if (p~=nil) then num = p-cipher.number(key)+1 lim = limit(num, #cipher.alphabet) return cipher.letter(lim) end end, encode = function (msg, key) up = string.upper(msg) code = "" for i = 1,#up do let = string.sub(up, i, i) num = limit(i, #key) ciph = string.sub(key, num, num) hm = cipher.shift(let, ciph) if hm == nil then hm = let end code = code .. hm end return code end, decode = function (msg, key) up = string.upper(msg) code = "" for i = 1,#up do let = string.sub(up, i, i) num = limit(i, #key) ciph = string.sub(key, num, num) hm = cipher.antishift(let, ciph) if hm == nil then hm = let end code = code .. hm end return string.lower(code) end, anagram = function (msg, keynum) code = "" no = math.ceil(#msg/#keynum) print(no) for i = 1, no do tab = {} str = string.sub(msg, (#keynum*i)-#keynum+1, i*#keynum) print(str) for v = 1,#str do point = tonumber(string.sub(keynum, v, v)) print(point) tab[point] = string.sub(str, v, v) end code = code .. table.concat(tab) end return code end } This is mah ultimate cipher script. To use, you pick a key word and encode a message like this: print(cipher.encode("Hello, does this pwn or WHAT?", "sdfgw")) --> ZHQRK, IUAK YNEK UCJ RW SZDY? And the decode function to do the opposite... print(cipher.decode("ZHQRK, IUAK YNEK UCJ RW SZDY?", "sdfgw")) --> hello, does this pwn or what? =D
bloccoRPG
#16011468Thursday, October 29, 2009 8:47 PM GMT

I just made an interesting discovery... tab = {a = 1, b = 2, c = 3} print(#tab) --> 0 Exactly. So you need to make a function that actually iterates over all of it. A real pain.
sdfgw
Top 50 Poster
#16011480Thursday, October 29, 2009 8:47 PM GMT

Woah, it's longer than I thought. Must include the anagram cipher aswell.
Kyngsilver
#16011504Thursday, October 29, 2009 8:48 PM GMT

ok... @( it does a little
sdfgw
Top 50 Poster
#16011506Thursday, October 29, 2009 8:48 PM GMT

@blocco: HAX
Prehistoricman
#16011674Thursday, October 29, 2009 8:51 PM GMT

Ya, really hax...
Kyngsilver
#16011688Thursday, October 29, 2009 8:52 PM GMT

soo... (extended) coudnt find what ^ arithmatic operation meant. Can yer help oo mighty ones?
bloccoRPG
#16011701Thursday, October 29, 2009 8:52 PM GMT

^ == exponents.
Kyngsilver
#16011763Thursday, October 29, 2009 8:53 PM GMT

thanks.. again
sdfgw
Top 50 Poster
#16011780Thursday, October 29, 2009 8:54 PM GMT

*enjoys adding on to other people's posts* So if you said 5^2 It would be the same as 5 squared.
Prehistoricman
#16011791Thursday, October 29, 2009 8:54 PM GMT

Erm...I always knew it as power to. Like 5 to the power of 2 would be 5^2.
Kyngsilver
#16011817Thursday, October 29, 2009 8:54 PM GMT

yeh, i got it...
sdfgw
Top 50 Poster
#16011836Thursday, October 29, 2009 8:55 PM GMT

My maths teacher takes off the "power of" bit. She just says 5 to the 2. :P
Prehistoricman
#16011840Thursday, October 29, 2009 8:55 PM GMT

EPIC LOL, or coincidence! I posted, before I saw your post, and we used same examples!
bloccoRPG
#16011858Thursday, October 29, 2009 8:55 PM GMT

"5 to the 2" XD

    of     2   
chevron_rightchevron_rightchevron_right