In lua -- Im making a game where you need to sell items. I have two tables. One for items, and one for item costs.
itemcosts = {
"Chewed Gum" == 5,
"Leaf" == 2,
"Lint" == 5,
"Moldy bread crumbs" == 10
}
items = {"Leaf"}
How would I like specify the price? Like I tried
price = itemcosts[items[1]]
but It didn't work. Any help?