venstnly
(ven)
#1
hey,
what I’m trying to do is to insert new variables into a table, I expect the result to be like this:
![image_2023-09-01_193941769](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/3/5/e/1/35e1323d6140881ae7a5cdc17d5ad37fba620fae.png)
but the result isn’t what I expected:
![image_2023-09-01_194043945](/secure-uploads/uploads/original/5X/c/c/1/4/cc14f7bb4b3d19660ba854fd572b0d85e5fa8eb6.png)
as you can see, the table is instantly a number despite me already attempting to add variables inside that table. I’m not sure what I’m doing wrong:
![image_2023-09-01_194433869](/secure-uploads/uploads/original/5X/8/d/7/3/8d739c9cc26dd6cd5801a212b8b6886e6087d7fa.png)
sorry for my horrible explanation, but please do tell me if you have questions. thanks!
![am](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/5/3/0/4/530432137e30dd00c2225fc927f88646380aed2c.png)
you mean something like this?
local towers = {}
table.insert(towers,{["Pistol Man"] = {Progress = 0, Achieved = {}}})
for _,v in ipairs(towers) do
print(v)
end
1 Like
Actulurus
(Arcturus)
#3
Seems like it’s caused by a different part of the script, mind sending the entire code please?
venstnly
(ven)
#4
exactly what I’m looking for! I thought the method I’m using is also doable. thanks a bunch!
![image_2023-09-01_202112686](//devforum-uploads.s3.dualstack.us-east-2.amazonaws.com/uploads/original/5X/5/f/f/c/5ffcb9dc0c17b716e6769734f130a8ccbfb25d08.png)
system
(system)
Closed
#5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.