testdoor = createObject(1499, 1580.03149, -1631.73987, 13.38281)
bindKey(source, "e", "down", function()
local currentFreezeStatus = isElementFrozen ( testdoor )
if currentFreezeStatus then
setElementFrozen ( testdoor, not currentFreezeStatus )
outputChatBox("You have closed the door!",255,255,255)
else
setElementFrozen ( testdoor, currentFreezeStatus )
outputChatBox("You have opened the door!",255,255,255)
end
end)
its showing an error bad argument @ 'bindkey' [expected player argument 1, but nil]