Yazir Posted January 29, 2017 Share Posted January 29, 2017 (edited) Hello! I have a problem. I wanted to ipair a table but it won't go through indexes. Made some debug outputs and these are the code and the result: buildingClasses = { ["Residential"] = { {"Soda Can (Mountain Dew)",2405,2,0,0.28}, {"Watch",2710,2,0,4.20}, {"Compass",1579,2,0,1.40}, {"Map",1277,3,0,0.84}, {"Double-barreled Shotgun",349,1,90,0.84}, {"test",349,1,90,0.84}, }, } outputChatBox(type(buildingClasses)) outputChatBox(table.getn(buildingClasses)) outputChatBox(#buildingClasses) outputChatBox(#buildingClasses["Residential"]) outputChatBox(#buildingClasses["Residential"][1]) --[[ Output: table 0 0 6 5 ]] Got the issue: I've used ipairs instead of pairs Edited January 29, 2017 by Yazir Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now