|
| 04 Feb 2012 06:56 PM |
function v(t) return t(math.random(1,#t)) end t2={"yo","yoo"} l=v(t2) print(l)
~sharky99 |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 06:57 PM |
| WOW, what are you trying to do because that is one BAD script... |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 07:02 PM |
Flappy, you suck.
it returns a random table value out of its parameter 't' which is a table, in this case, t2. I made it like this so I can just use one function to return a value of a series of tables. |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 07:03 PM |
nevermind, I fixed it myself...
function v(t) return t[math.random(1,#t)]end t2={"yo","yoo"} l=v(t2) print(l) |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 07:05 PM |
| if you put spaces inbetween it looks more neat and ledgible |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 07:05 PM |
| Wow, you suck for saying I suck. By the logic you got that wrong you suck. Noob. |
|
|
| Report Abuse |
|
|
|
| 04 Feb 2012 07:06 PM |
| Sorry, I should have re-read what I scripted, I assumed I had brackets there so it looked like a function... My bad... |
|
|
| Report Abuse |
|
|