undefined Posted October 25, 2014 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?
Moderators IIYAMA Posted October 25, 2014 Moderators 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. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
$@!m HeRO Posted October 25, 2014 Posted October 25, 2014 Welcome from IIYAMA's Side....i'm his brother it'S Go0D To Be BaD ! ! ! [Owner of [EgO] Gang : www.egoteam.site.bz] [Old Online Gamer , Scripter and programmer] [Contacts : [skype]saim.zia26 - [xfire]saimrock26]
Moderators IIYAMA Posted October 25, 2014 Moderators Posted October 25, 2014 Welcome from IIYAMA's Side....i'm his brother huh???? @AbaZaSiRiN00 np. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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