TP function SRCDS Shutsdown on start

Ok im trying to make a teleport function for admins on my server, but when i start the server with the tp code it shutsdown before the server contacts steams servers.
the code for the tp:

function TP(ply, text)
    local Array = string.Explode( " ", text );
        
        if Array[1] == "/goto" && ply:IsAdmin() then
            for k , t in ipairs(player.GetAll()) do
            if string.find(string.lower(t:Nick()) , string.lower(Array[2])) then
            WriteToLog( ply:GetName() .." Teleported to " .. t:Nick());
            local vec1 = Vector(50,50,50);
            local vec2 = t:GetPos();
            --local vec3 = vec2:Add(vec1);
            t:SetPos(vec1 + vec2);
            else
            ply:PrintMessage( HUD_PRINTTALK, "Player name wasnt valid!");        
            end
            end
            return false
        end
end
hook.Add( "PlayerSay", "TP", TP)

anyone that knows why the server shutsdown right on start?
i got a screenshot right before the server shutsdown, it goes so fast that you cant see all errors but you can try.
This just happens when i add this code!

Please Help!

When testing code it is much easier to do it locally with singleplayer or Create Multiplayer, that way you get all of the console log. That being said you should be able to check the logs for lua errors.

Otherwise I don’t really see an error in your script, note that the ; are completely unnecessary and only serve to confuse anyone reading your code.