KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 25 Aug 2014 08:57 AM |
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}
for i = 1,#Alphabet do print(Alphabet[1]) wait(1) end
why doesnt it work? |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 25 Aug 2014 09:01 AM |
i even tried this:
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}
for i ,v in pairs(Alphabet) do print(math.random(1,#Alphabet)) wait(1) end
no output. |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2014 09:03 AM |
Silly king, you used 1 instead of i
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}
for i = 1,#Alphabet do print(Alphabet[i])--i instead of 1 here wait(1) end
this way it will cycle through the alphabet, since i increases by 1 every time. |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 25 Aug 2014 09:07 AM |
| wait. It still doesnt work. |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2014 09:09 AM |
Oh yeah, quotes around the letters in alphabet
Alphabet = {"a","b","c"} and so on. because you're working with strings, not variables :p |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 25 Aug 2014 12:24 PM |
| also, how would i make it just go random? |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
|
| 25 Aug 2014 01:25 PM |
| bump-how would i make it just go random? |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2014 01:46 PM |
| print(Alphabet[math.random(#Alphabet)] |
|
|
| Report Abuse |
|
|
KingJacko
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 3944 |
|
| |
|