Jump to content

Table Count


3B00DG4MER

Recommended Posts

Posted

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

SAF/SAO - 30%

Skype: Themerzoug2020

in-game name:3B00DG4MER

xOG7h1J.png

Posted

You use hashtag to count table contents, for example;

#skins[1] 

should return 6.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

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.

If I helped you, please click the like button on the right ;) Thanks!

Posted
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 :mrgreen:

but thanks :D

SAF/SAO - 30%

Skype: Themerzoug2020

in-game name:3B00DG4MER

xOG7h1J.png

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...