3B00DG4MER Posted December 16, 2014 Share Posted December 16, 2014 Hi Guys, Today i wanted to make a table which has got all type of Skins in GTA but i've a small problem how i can count all rows in the table ?! like this one ? : local skins = { [1] = {1, 2, 23, 26, 27, 29}, in here we've got 6 rows Link to comment
Dealman Posted December 16, 2014 Share Posted December 16, 2014 You use hashtag to count table contents, for example; #skins[1] should return 6. Link to comment
3B00DG4MER Posted December 16, 2014 Author Share Posted December 16, 2014 You use hashtag to count table contents, for example; #skins[1] should return 6. i forgot that Thanks Link to comment
myonlake Posted December 18, 2014 Share Posted December 18, 2014 Keep in mind the hashtag technique only works for indexed tables. If you use key based tables you have to use a custom counter, which is based on a pairs for loop iterator. Link to comment
3B00DG4MER Posted December 18, 2014 Author Share Posted December 18, 2014 Keep in mind the hashtag technique only works for indexed tables. If you use key based tables you have to use a custom counter, which is based on a pairs for loop iterator. I know dat but thanks 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