undefined Posted October 25, 2014 Share Posted October 25, 2014 Hi guys. Im work on the party system. local test = { test2 = { ["userdata: 46f6s68"] = { leader = "ZoRRoM^", member = {} }, ["userdata: 54fghd9"] = { leader = "Narkoz", member = {} } } } outputChatBox(#test.test2) Im try it for the get count table. But it's not work. It's have 2 count. But #test.test2 say's 0. How to fix it? Link to comment
Moderators IIYAMA Posted October 25, 2014 Moderators Share Posted October 25, 2014 local tableRange = 0 for key,data in pairs(test.test2) do tableRange = tableRange+1 end outputChatBox(tableRange) Tables without using the array can't use #. If this table had an array it would only have numbers as index. Link to comment
undefined Posted October 25, 2014 Author Share Posted October 25, 2014 Thank you IIYAMA. It's solved... Link to comment
$@!m HeRO Posted October 25, 2014 Share Posted October 25, 2014 Welcome from IIYAMA's Side....i'm his brother Link to comment
Moderators IIYAMA Posted October 25, 2014 Moderators Share Posted October 25, 2014 Welcome from IIYAMA's Side....i'm his brother huh???? @AbaZaSiRiN00 np. 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