Yes, that was your issue, remember the following:
Input.GetButtonDown asks for the name of the button in the form of a string to work, while Input.GetMouseButtonDown asks for the number of the button in the form of an int.
I would double check the input system. Sometimes it reverts back to new or back to old. Try changing it to old, then after unity restarts change it to both.
Hi, it would help if you indicate the line on which the error occurs. For a null reference error, we need to identify which variable is null and then figure out why.
before : if (hasAuthority) { return; }
if (Input.GetMouseButtonDown(1)) {return;}
Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray, out RaycastHit hit, Mathf.Infinity)) { return; }
CmdMove(hit.point);
and after Fix :
if (!hasAuthority) { return; }
if (!Input.GetMouseButtonDown(1)) {return;}
Ray ray = mainCamera.ScreenPointToRay(Input.mousePosition);
if (!Physics.Raycast(ray, out RaycastHit hit, Mathf.Infinity)) { return; }
CmdMove(hit.point);