Search Unity

Question Cs1001 identifier expected error in tutorial

Discussion in 'Getting Started' started by rapanisnikolas, Jul 2, 2021.

  1. rapanisnikolas

    rapanisnikolas

    Joined:
    Jun 27, 2021
    Posts:
    1
    I am doing this tutorial: https://learn.unity.com/tutorial/ch...dddeedbc2a0020bc3ea1#5fab0dc2edbc2a0e772fd044

    And I have written this script:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class BallScaleChange : MonoBehaviour
    6. {
    7.     public Vector3 scaleChange;
    8.     // Start is called before the first frame update
    9.     void Start()
    10.     {
    11.        
    12.     }
    13.  
    14.     // Update is called once per frame
    15.     void Update()
    16.     {
    17.         transform.localshare. += scaleChange;
    18.     }
    19. }
    But I am always getting the "cs1001 identifier expected" error.

    I followed the tutorial. Is there a problem with my code?
     
  2. jbnlwilliams1

    jbnlwilliams1

    Joined:
    May 21, 2019
    Posts:
    267
    Not sure what transform.localshare. is, but it is looking for a final identifier after the localshare.
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I suspect that was meant to be
    transform.localScale += scaleChange;
     
    Ryiah likes this.