Jump to content

litel help whit a Table


bandi94

Recommended Posts

i get stuck at this table and i don't know what is the problem

i have a table i don't post the full tabel bk it have 42 position's

and i get "bad argument #1 to unpack (table expected, got number ) " hm.... ? thx for helping

Raketa={ 
{4621.299,-1879.550,7.09}, 
{4642.919,-1879.550,7.09}, 
{4707.779,-1879.550,7.09}, 
{4729.399,-1879.550,7.09}, 
{4751.019,-1879.550,7.09} 
} 
  
  
 for i,v in pairs (Time) do  
  if v==time then 
  
x,y,z=unpack(Raketa[i]) 

Link to comment
i get stuck at this table and i don't know what is the problem

i have a table i don't post the full tabel bk it have 42 position's

and i get "bad argument #1 to unpack (table expected, got number ) " hm.... ? thx for helping

Raketa={ 
{4621.299,-1879.550,7.09}, 
{4642.919,-1879.550,7.09}, 
{4707.779,-1879.550,7.09}, 
{4729.399,-1879.550,7.09}, 
{4751.019,-1879.550,7.09} 
} 
  
  
 for i,v in pairs (Time) do  
  if v==time then 
  
x,y,z=unpack(Raketa[i]) 

where the table (Time)

and where the time variable ?

Link to comment

i don't post them bk they are don't have any influence on my error but to make you happy here is

Raketa={ 
{4621.299,-1879.550,7.09}, 
{4642.919,-1879.550,7.09}, 
{4707.779,-1879.550,7.09}, 
{4729.399,-1879.550,7.09}, 
{4751.019,-1879.550,7.09}, 
{4772.639,-1879.550,7.09}, 
{4794.259,-1879.550,7.09}, 
{4815.879,-1879.550,7.09}, 
{4837.499,-1879.550,7.09}, 
{4632.309,-1854.029,7.09}, 
{4653.929,-1854.029,7.09}, 
{4675.549,-1854.029,7.09}, 
{4697.169,-1854.029,7.09}, 
{4718.789,-1854.029,7.09}, 
{4740.409,-1854.029,7.09}, 
{4762.029,-1854.029,7.09}, 
{4783.649,-1854.029,7.09}, 
{4649.700,-1864.699,7.09}, 
{4649.700,-1868.699,7.09}, 
{4653.700,-1866.699,7.09}, 
{4657.700,-1864.699,7.09}, 
{4657.700,-1868.699,7.09}, 
{4671.290,-1864.699,7.09}, 
{4671.290,-1868.699,7.09}, 
{4675.290,-1866.699,7.09}, 
{4679.290,-1867.699,7.09}, 
{4679.290,-1868.699,7.09}, 
{4692.880,-1867.699,7.09}, 
{4692.880,-1868.699,7.09}, 
{4696.880,-1866.699,70.9}, 
{4700.880,-1867.699,7.09}, 
{4700.880,-1868.699,7.09}, 
{4714.470,-1867.699,7.09}, 
{4714.470,-1868.699,7.09}, 
{4718.470,-1866.699,7.09}, 
{4722.470,-1867.699,7.09}, 
{4722.470,-1868.699,7.09}, 
{4736.060,-1867.699,7.09}, 
{4736.060,-1868.699,7.09}, 
{4740.060,-1866.699,7.09}, 
{4744.060,-1867.699,7.09}, 
{4744.060,-1868.699,7.09} 
} 
  
  
 time=0 
Raketa={28,29,30,31,32 } 
Time={1,1,1,1,1} 
  
function show() 
time=time+1 
local x 
local y 
local z 
  
 for i,v in pairs (Time) do  
  if v==time then 
  
x,y,z=unpack(Raketa[i]) 
  
  
letrehoz(x,y,z) 
  
end 
 end 
end 

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