Hello I have a problem with lua.Why i cant load this function ?


elseif (label == "BeforeDoor1") then
if not (Self.Position().x == 32821) and (Self.Position().y == 31111) and (Self.Position().z == 7) then
gotoLabel("UseDoor1")
end

XenoScript Error:
Line #: 115
Error: 'end' expected (to close 'function' at line 27) near 'elseif'
This is an error with user-input and should not be reported as a bug with XenoBot.