i want to use string.sub to get the number at the end of
a name (suffix). if i do: sub=tonumber(string.sub(sName,-1))
it is ok for numbers 0-9, but i can’t get numbers/suffixes
with more than one character – ie: i need 1-24, names are
‘pad1’ to ‘pad24’
i tried numbering 01-24 but it hasn’t been working for some
reason (although i think it did previously, going to try again).
aaaah… figured it out: i was counting from the end
when i didn’t need to. as the names are ‘pad’..n, all
i had to do was count from the beginning of the name,eh.
so that’s: sub=tonumber(string.sub(sName,4))
and no need to try to number 01,02,etc. as that cannot
match for i=1,24
duh, simple solutions.