ok bro thx i will do it now   
Edit : Ok correct or not  
local gateMoveTable = { 
    {    
        ["element"] =   createObject(986,586,-1906.0999755859,3,0,0,355.74279785156), 
        ["open"]    =   {500,579.20001220703,-1905.5999755859,3}, 
        ["close"]   =   {500,586,-1906.0999755859,3}, 
    } 
    { 
        ["element"] =   createObject(985,593.90002441406,-1906.6999511719,3,0,0,355.74279785156), 
        ["open"]    =   {500,600.59997558594,-1907.1999511719,3}, 
        ["close"]   =   {500,593.90002441406,-1906.6999511719,3}, 
    } 
} 
  
  
local manageGate = function (player,command) 
    for i=1,#gateMoveTable do 
        local gateTable = gateMoveTable[i] 
        moveObject(gateTable["element"],unpack(gateTable[command])) 
    end 
end 
addCommandHandler("open", manageGate) 
addCommandHandler("close", manageGate) 
 
Error : Loading script failed: Death-race\gate.lua:7: '}' expected  near '{'