My unity is saying that there is a syntax error but I have look at my code over and over again and I can’t find what it means. here’s the code and here the errors Assets\Grapple.cs(63,30): error CS1003: Syntax error, ‘,’ expected and Assets\Grapple.cs(62,30): error CS1003: Syntax error, ‘,’ expected
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Grapple : MonoBehaviour
{
private LineRenderer lr;
private Vector3 grapplePoint;
public LayerMask whatisGrappleable;
public Transform gunTip, camera, player;
private float maxDistance = 100f;
private SpringJoint joint;
void Awake()
{
lr = GetComponent<LineRenderer>();
}
void Update()
{
if (Input.GetMouseButtonDown(0))
{
StartGrapple();
}
else if (Input.GetMouseButtonUp(0))
{
StopGrapple();
}
}
void LateUpdate()
{
DrawRope();
}
void StartGrapple()
{
RaycastHit hit;
if (Physics.Raycast(camera.position, camera.forward, out hit, maxDistance))
{
grapplePoint = hit.point;
joint = player.gameObject.AddComponent<SpringJoint>();
joint.autoConfigureConnectedAnchor = false;
joint.connectedAnchor = grapplePoint;
float distanceFromPoint = Vector3.Distance(player.position, grapplePoint);
joint.maxDistance = distanceFromPoint * 0.8f;
joint.minDistance = distanceFromPoint * 0.25f;
joint.spring = 4.5f;
joint.damper = 7f;
joint.massScale = 4.5f;
}
}
void DrawRope()
{
lr.SetPosition(index 0, gunTip.position);
lr.SetPosition(index 1, grapplePoint);
}
void StopGrapple()
{
}
}