check what you havnt defined 'pos' in script :
function onStepIn(cid, item, position, fromPosition)
local newnPosition = {x=32315, y=32247, z=9}
local tilepos1 = {x=33114, y=31703, z=12}
local tilepos2 = {x=33116, y=31703, z=12}
local tilepos5 = {x=33115, y=31702, z=12}...