Changed so it looked like this:
function onUse(cid, item, frompos, item2, topos)
local switchUniqueID = 30050 -- uniqueID of switch
local switchID = 1945
local switch2ID = 1946
local itemID = 2881
local itempos = {x=921, y=961, z=8, stackpos=1}
local wallpos = {x=919, y=962...