Hey guys, trying to make this simple program not allow you to move anymore left or right while your on the map, but it is saying that && isn’t a command? Can someone please tell me how to fix it.
void Update()
{
GetComponent().velocity = new Vector3 (horizVel, 0, 4);
if (Input.GetKeyDown(moveL)) && (laneNum>1))
{
horizVel = -2;
StartCoroutine(stopSlide());
laneNum -= 1
}
if (Input.GetKeyDown(moveR)) && (laneNum<2))
{
horizVel = 2;
StartCoroutine(stopSlide());
laneNum += 1
}