Jump to content




Index Expected, got Nil.


  • You cannot reply to this topic
1 reply to this topic

#1 Rwkeith

  • Members
  • 56 posts

Posted 06 January 2013 - 10:09 AM

I'm assigning values to an array. However, my for loop doesn't seem to be working right.

for o=1,size do
    textTable[o] = string.sub(text,o,o)
end

I've tested my size variable. That's fine. I've also tried to use string.sub(text,o,o), but that gives me a similar error. However, I can assign it to a variable and print the variable. Any advice would be appreciated.

#2 Rwkeith

  • Members
  • 56 posts

Posted 06 January 2013 - 10:11 AM

Fixed my problem right after posting. Apparently the website I was reading on tables made a big mistake when they said you didn't need to declare tables.

All I needed was textTable = {}





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users