of     1   

M4LLARD
#185920656Wednesday, March 23, 2016 11:03 PM GMT

How would I create a variable with a different name, every time a loop runs? Example: for i = 1,#Items do local Item..i = Items[i] end This will not work, for obvious reasons, but how can I achieve this? Or do I just have to manually type out all the variable names?
M4LLARD
#185920694Wednesday, March 23, 2016 11:04 PM GMT

The table (Items) is just a list of strings.
M4LLARD
#185921457Wednesday, March 23, 2016 11:17 PM GMT

bump
M4LLARD
#185922240Wednesday, March 23, 2016 11:31 PM GMT

so, uh, do people wanna help me?
script_frog
#185922634Wednesday, March 23, 2016 11:38 PM GMT

you would need a new table to set all the new variables in
M4LLARD
#185922822Wednesday, March 23, 2016 11:41 PM GMT

Alright, seems like a bit of a pain
ray_revenge
#185922852Wednesday, March 23, 2016 11:42 PM GMT

use a table Recommended username: StingyRay_revenge
CoyoteStark
#185923366Wednesday, March 23, 2016 11:50 PM GMT

Why would you want to do that? Tell me what you're trying to achieve and I might find you a better way to do it.
cgjnm
#185923966Wednesday, March 23, 2016 11:59 PM GMT

local Table = {} for i = 1, (some number) do table.insert(Table, "Some Name"..i) end
HumanXerxes
#185925660Thursday, March 24, 2016 12:24 AM GMT

local Variables={} for i = 1,#Items do Variables["Item"..i] = Items[i] end print(Variables.Item1) --prints Item1

    of     1