I’m slightly confused over your question. Can you elaborate?
The best guess I have here is…
-- next() global
print(next(Tutorial))
-- assigning variables from next()
local key, value = next(Tutorial)
print(key, value) -- Kill 5 Peasants and 5 is printed.
-- for loop
for key, value in next, Tutorial do
print(key, value)
end
the key, value = next(tutorial) thing is what i’m trying to achieve how would i make it correspond to a number though? for example stage 1 corresponds to the first key in the table which is to kill 5 peasants then stage 2 could correspond to the second key
So something like
local Tutorial = {
["Kill 5 Peasants"] = 5,
["Kill 5 Local Lords"] = 5,
}
print(Tutorial[1]) -- returns kill 5 peasants
print(Tutorial[2]) -- returns kill 5 local lords