Code: Select all
print("Here are the options:")
print(" 1. Group 1")
print(" 2. Group 2")
print(" 3. Group 3")
printf("Enter Group to send belts to > ")
local selected = io.stdin:read()
printf("selected = %s\n",selected) -- this prints the number correctly
if selected == 1 then
nameTable = {
"Char1",
"Char2",
"Char3",
"Char4"
}
elseif selected == 2 then
nameTable = {
"Char17",
"Char18",
"Char19",
"Char20"
}
elseif selected == 3 then
nameTable = {
"Char33",
"Char34",
"Char35",
"Char36"
}
end
printf("table has %s items.\n",table.maxn(nameTable))
** EDIT:
Well, I just figured it out. Apparently I have to put the number in quotes like
Code: Select all
if selected == "1" then
