bandi94 Posted December 25, 2011 Posted December 25, 2011 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])
TAPL Posted December 25, 2011 Posted December 25, 2011 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 ?
bandi94 Posted December 25, 2011 Author Posted December 25, 2011 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
TAPL Posted December 25, 2011 Posted December 25, 2011 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} } Raketa={28,29,30,31,32 } Raketa + Raketa = problem
Castillo Posted December 25, 2011 Posted December 25, 2011 Could you explain what are you trying to do? because I don't get it.
bandi94 Posted December 25, 2011 Author Posted December 25, 2011 yes i got it i forgot to delet the old table i am trying to make a Happy New Year Rocket Show in that table are stored the rocket position's and on the Time thable when thay need to get created
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