When I run a for loop through it I get random items instead of it running in the order I declared it as.
Example:
Is it possible to fix this?
Sorry for double post the page got stuck loading and I didn't see a new topic created
spawns={ 	"OCEAN", 	"SHIT", 	"PRINT", 	"CLITR", 	"CENTRE", 	"SATANSVILLE" } for i=1,#spawns do 	print(spawns[i]) end
reserved
MAP.ORDER = {"OCEAN", "DESERT", "MARBLE", "SNOW", ...}
for _, k in pairs(MAP.ORDER) do 	local v = MAP.SPAWNS[k] 	print(k, v) 	 end
reserved
spawns={ "OCEAN", "SHIT", "PRINT", "CLITR", "CENTRE", "SATANSVILLE" }
spawns={ [1] = "OCEAN", [2] = "SHIT", [3] = "PRINT", [4] = "CLITR", [5] = "CENTRE", [6] = "SATANSVILLE" }
print(spawns[2])
for i=1,#spawns do 	print(spawns[i]) end
SPAWNS = { OCEAN = { ... stuff ... }, DESERT = { ... stuff ... }, MARBLE = { ... stuff ... }, .... }
SPAWNS = { { name="OCEAN", ... stuff ... }, { name="DESERT", ... stuff ... }, { name="MARBLE", ... stuff ... }, .... }