Jump to content

help me with this table


Recommended Posts

Posted

hi guys :roll:

i make new table

but i need anyone explain for me

How to add number to table automatically?

local MyTable = {

[5] = 1,

Each time more than 5

[10] = 2,

[15] = 3,

[20] = 4,

[25] = 5,

[30] = 6,

[35] = 7,

[40] = 8,

[45] = 9,

here all numbe

until

[1005] = 200

}

sory guys I am new here

I hope anyone help me

Thanks

  
  
--- this table i use for my script 
  
local MyTable = { 
    [5] = 1, 
    [10] = 2, 
    [15] = 3, 
    [20] = 4, 
    [25] = 5, 
    [30] = 6, 
    [35] = 7, 
    [40] = 8, 
    [45] = 9, 
} 
  

Guest Guest4401
Posted
n = 0 
t = {} 
  
repeat 
    n = n + 1 
    t[n*5] = n 
until n*5 >= 1005 

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...