Errors while trying to draw HUD

See edit in the post: I’ve fixed the problem