Jump to content

Tabela


Recommended Posts

Alguém sabe como eu adiciono um id para uma tabela?

quero fazer um sistema de abastecimento por exemplo no local x que tem varias posições (x,y,z) esse local vai receber um id x 

posicoes = {
	{1938.35266, -1778.71985, 13.38281,     1940.72449, -1778.48633, 13.39060,     1938.35266, -1778.71985, 13.38281,  0,     1941.72046, -1778.48376, 14.39060,	1939.68616, -1780.47058, 13.39060}, -- Bomba 1
	{1938.33154, -1767.38000, 13.38281,     1940.72351, -1767.32568, 13.39060,     1938.33154, -1767.38000, 13.38281,  0,     1941.72351, -1767.32568, 14.39060,	1939.66479, -1769.13367, 13.38281}, -- Bomba 2
	{1944.55579, -1778.50830, 13.39060,     1942.60840, -1778.49207, 13.39060,     1944.55579, -1778.50830, 13.39060,  180,   1941.72046, -1778.48376, 14.39060,	1943.12683, -1777.12988, 13.39060}, -- Bomba 3
	{1944.43140, -1767.24988, 13.38281,     1942.61975, -1767.30859, 13.39060,     1944.43140, -1767.24988, 13.38281,  180,   1941.72351, -1767.32568, 14.39060,	1942.98450, -1765.54785, 13.39060}, -- Bomba 4
	
	{1007.95508, -939.53308, 42.17969,     1007.63916, -937.28809, 42.17969,     1007.95508, -939.53308, 42.17969,  90,   1007.53247, -936.54156, 43.32813, 	1009.70935, -938.19427, 42.17969}, -- Bomba 5
	{1000.30652, -940.79962, 42.17969,     999.94574, -938.33441, 42.17969,     1000.30652, -940.79962, 42.17969,  90,   999.83368, -937.65015, 42.32813,	1001.94476, -939.39429, 42.17969}, -- Bomba 6
	{1006.94489, -933.30310, 42.17969,     1007.25824, -935.42303, 42.17969,     1006.94489, -933.30310, 42.17969,  270,   1007.53247, -936.54156, 43.32813, 	1005.21942, -934.65991, 42.17969}, -- Bomba 7
	{999.42529, -934.40009, 42.17969,     999.77362, -936.40533, 42.17969,     999.42529, -934.40009, 42.17969,  270,   999.83368, -937.65015, 42.32813, 	997.68323, -935.75867, 42.17969}, -- Bomba 8
	
	{2108.7233886719,928.56799316406,10.8203125,     2109.0913085938,926.48986816406,10.8203125,     2108.7233886719,928.56799316406,10.8203125,  272,   2109.0913085938,926.48986816406,10.8203125, 	2107.3334960938,927.07470703125,10.8203125}, -- Bomba 9
	{2120.5671386719,928.55401611328,10.8203125,     2120.7333984375,926.29040527344,10.8203125,     2120.5671386719,928.55401611328,10.8203125,  272,   2120.7333984375,926.29040527344,10.8203125,	2118.8334960938,927.06066894531,10.8203125}, -- Bomba 10
	{2121.2634277344,922.31982421875,10.8203125,     2120.8745117188,924.77770996094,10.8203125,     2121.2634277344,922.31982421875,10.8203125,  89,   2120.8745117188,924.77770996094,10.8203125, 	2122.587890625,923.97540283203,10.8203125}, -- Bomba 11
	{2109.3947753906,922.3515625,10.8203125,     2109.0830078125,924.81390380859,10.943323135376,     2109.3947753906,922.3515625,10.8203125,  89,   2109.0830078125,924.81390380859,10.943323135376, 	2110.9479980469,923.97796630859,10.8203125}, -- Bomba 12
	
	{2199.976, 2470.197, 10.82,     2197.648, 2470.332, 10.995,     2199.976, 2470.197, 10.82,  181,      2197.648, 2470.332, 10.995, 	2198.661, 2471.425, 10.82}, -- Bomba 13
	{2199.669, 2480.564, 10.82,     2197.524, 2480.329, 10.995,     2199.669, 2480.564, 10.82,  181,      2197.524, 2480.329, 10.995,  	2198.354, 2482.204, 10.82}, -- Bomba 14
	{2205.198, 2480.27, 10.82,      2207.116, 2480.281, 10.995,     2205.198, 2480.27, 10.82,  0.14,      2207.116, 2480.281, 10.995, 	2206.673, 2478.743, 10.82}, -- Bomba 15
	{2204.912, 2470.237, 10.82,     2207.111, 2470.26, 10.995,      2204.912, 2470.237, 10.82,  0.14,     2207.111, 2470.26, 10.995, 	2206.375, 2468.653, 10.82}, -- Bomba 16
	
	{-2023.125, 159.376, 28.836,     -2025.729, 159.067, 29.039,     -2023.125, 159.376, 28.836,  182,      -2025.729, 159.067, 29.039, 	-2024.625, 161.064, 28.836}, -- Bomba 17
	{-2022.874, 153.091, 28.836,     -2025.865, 154.423, 29.039,     -2022.874, 153.091, 28.836,  182,      -2025.865, 154.423, 29.039,  	-2024.335, 154.925, 28.836}, -- Bomba 18
	{-2029.62, 154.267, 28.836,      -2027.212, 154.322, 29.039,     -2029.62, 154.267, 28.836,  2.022,      -2027.212, 154.322, 29.039, 	-2028.142, 152.323, 28.836}, -- Bomba 19
	{-2029.47, 159.005, 28.836,      -2027.214, 159.07, 29.039,      -2029.47, 159.005, 28.836,  2.022,     -2027.214, 159.07, 29.039, 	    -2027.964, 157.358, 28.836}, -- Bomba 20

	{-2406.309, 981.981, 45.297,     -2409.958, 981.538, 45.402,     -2406.309, 981.981, 45.297,  181,      -2409.958, 981.538, 45.402, 	-2407.791, 983.524, 45.297}, -- Bomba 21
	{-2406.342, 971.37, 45.297,     -2410.024, 970.807, 45.422,      -2406.342, 971.37, 45.297,  181,      -2410.024, 970.807, 45.422,  	-2407.796, 973.152, 45.297}, -- Bomba 22
	{-2415.353, 970.581, 45.297,      -2411.844, 970.861, 45.434,    -2415.353, 970.581, 45.297,  359.642,      -2411.844, 970.861, 45.434, 	-2413.939, 968.776, 45.297}, -- Bomba 23
	{-2415.099, 981.033, 45.297,      -2411.802, 981.546, 45.447,      -2415.099, 981.033, 45.297,  359.642,     -2411.802, 981.546, 45.447, 	    -2413.656, 979.392, 45.297}, -- Bomba 24		

	{-1598.664, -2705.528, 48.539,     -1600.196, -2707.168, 48.539,     -1598.664, -2705.528, 48.539,  230.361,      -1600.196, -2707.168, 48.539, 	-1600.859, -2705.596, 48.539}, -- Bomba 25
	{-1602.305, -2709.998, 48.539,     -1603.461, -2711.639, 48.533,      -1602.305, -2709.998, 48.539,  230.361,      -1603.461, -2711.639, 48.533,  	-1604.487, -2710.082, 48.533}, -- Bomba 26
	{-1605.235, -2714.753, 48.533,      -1606.785, -2716.029, 48.539,    -1605.235, -2714.753, 48.533,  230.361,      -1606.785, -2716.029, 48.539, 	-1607.583, -2714.617, 48.539}, -- Bomba 27
	{-1608.65, -2719.327, 48.539,      -1610.095, -2720.43, 48.539,      -1608.65, -2719.327, 48.539,  230.361,     -1610.095, -2720.43, 48.539, 	    -1610.896, -2719.343, 48.539}, -- Bomba 28	

	{-1326.597, 2688.633, 50.063,     -1326.945, 2686.39, 50.063,     -1326.597, 2688.633, 50.063,  263.188,      -1326.945, 2686.39, 50.063, 	-1328.41, 2687.231, 50.063}, -- Bomba 29
	{-1326.996, 2682.932, 50.063,     -1327.739, 2680.924, 50.063,      -1326.996, 2682.932, 50.063,  263.188,      -1327.739, 2680.924, 50.063,  	-1329.051, 2681.603, 50.063}, -- Bomba 30
	{-1327.781, 2677.351, 50.063,      -1328.437, 2675.479, 50.063,    -1327.781, 2677.351, 50.063,  263.188,      -1328.437, 2675.479, 50.063, 	-1329.833, 2676.023, 50.063}, -- Bomba 31
	{-1328.286, 2672.056, 50.063,      -1329.033, 2670.041, 50.063,      -1328.286, 2672.056, 50.063,  263.188,     -1329.033, 2670.041, 50.063, 	    -1330.426, 2670.701, 50.063}, -- Bomba 32	
}

 

Link to comment
  • Other Languages Moderators

Indexe a tabela.

posicoes = {
	[1] = {1938.35266, -1778.71985, 13.38281,     1940.72449, -1778.48633, 13.39060,     1938.35266, -1778.71985, 13.38281,  0,     1941.72046, -1778.48376, 14.39060,	1939.68616, -1780.47058, 13.39060}, -- Bomba 1
	[2] = {1938.33154, -1767.38000, 13.38281,     1940.72351, -1767.32568, 13.39060,     1938.33154, -1767.38000, 13.38281,  0,     1941.72351, -1767.32568, 14.39060,	1939.66479, -1769.13367, 13.38281}, -- Bomba 2
	[3] = {1944.55579, -1778.50830, 13.39060,     1942.60840, -1778.49207, 13.39060,     1944.55579, -1778.50830, 13.39060,  180,   1941.72046, -1778.48376, 14.39060,	1943.12683, -1777.12988, 13.39060}, -- Bomba 3
	[4] = {1944.43140, -1767.24988, 13.38281,     1942.61975, -1767.30859, 13.39060,     1944.43140, -1767.24988, 13.38281,  180,   1941.72351, -1767.32568, 14.39060,	1942.98450, -1765.54785, 13.39060}, -- Bomba 4

	[5] = {1007.95508, -939.53308, 42.17969,     1007.63916, -937.28809, 42.17969,     1007.95508, -939.53308, 42.17969,  90,   1007.53247, -936.54156, 43.32813, 	1009.70935, -938.19427, 42.17969}, -- Bomba 5
	[6] = {1000.30652, -940.79962, 42.17969,     999.94574, -938.33441, 42.17969,     1000.30652, -940.79962, 42.17969,  90,   999.83368, -937.65015, 42.32813,	1001.94476, -939.39429, 42.17969}, -- Bomba 6
	[7] = {1006.94489, -933.30310, 42.17969,     1007.25824, -935.42303, 42.17969,     1006.94489, -933.30310, 42.17969,  270,   1007.53247, -936.54156, 43.32813, 	1005.21942, -934.65991, 42.17969}, -- Bomba 7
	[8] = {999.42529, -934.40009, 42.17969,     999.77362, -936.40533, 42.17969,     999.42529, -934.40009, 42.17969,  270,   999.83368, -937.65015, 42.32813, 	997.68323, -935.75867, 42.17969}, -- Bomba 8
	-- E assim por diante.
}

 

Link to comment

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