The warning occurs because onMarkerHit can be triggered by other elements like vehicles, not just players. This means you're sometimes passing a non-player element to getPlayerAccount, which results in returning false instead of an account. You should check if thePlayer is actually a player element before doing anything:
function moveGate(thePlayer)
if getElementType(thePlayer) == "player" then
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)) , aclGetGroup("PMESP")) then
moveObject(gate, 1500, 1334.8000488281, -1334.1999511719, 10)
end
end
end
addEventHandler("onMarkerHit", marker, moveGate)
You should do the same in the move_back_gate function, otherwise, it will execute twice when a player enters with a vehicle, for example.