Ferki
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 968 |
|
|
| 06 May 2013 08:50 AM |
Say = {"Hi!" , "Hello." , "Hey!" } print(math.random(#Speach))
All i get in the output is:
>>1
>>2
>>3
>>1
>>2
>>3
(Using Commandbar) |
|
|
| Report Abuse |
|
|
Looah
|
  |
| Joined: 22 Feb 2013 |
| Total Posts: 922 |
|
|
| 06 May 2013 08:58 AM |
... ehrm.. :i try
sp = {"ohai","bai","lolwt"} print(sp[math.random(#sp)])
public bool cats = !stupid; |
|
|
| Report Abuse |
|
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 06 May 2013 08:59 AM |
function Pick() math.randomseed(tick()) print(math.random(1, #Speach)) end
for i = 1,10 do Pick() end
|
|
|
| Report Abuse |
|
|
|
| 06 May 2013 08:59 AM |
No, it's more like
print(Speach[math.random(1, #Speach)])
can't remember but that may be it |
|
|
| Report Abuse |
|
|
Ferki
|
  |
| Joined: 22 Jan 2013 |
| Total Posts: 968 |
|
| |
|
juriaan
|
  |
| Joined: 25 Nov 2008 |
| Total Posts: 939 |
|
|
| 06 May 2013 09:01 AM |
If you wanna to get the Text :
print(TableName[math.random(1,#TableName)]))
|
|
|
| Report Abuse |
|
|
Looah
|
  |
| Joined: 22 Feb 2013 |
| Total Posts: 922 |
|
|
| 06 May 2013 09:02 AM |
juriaan 1, is unnessicary
public bool cats = !stupid; |
|
|
| Report Abuse |
|
|