Search Unity

So I don't know how to fix this by chance can I get some help?

Discussion in '2D' started by nelso52879, Feb 4, 2020.

  1. nelso52879

    nelso52879

    Joined:
    Jan 29, 2020
    Posts:
    6
    this is going to be a movement log but I really am having a problem because its saying error code CS1955 and I tried to fix it but it failed.
    Oh before I forget the error is line (49,20)

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class moveing : MonoBehaviour
    6.  
    7. {
    8.     public moveing controller;
    9.  
    10.     public float runSpeed = 40f;
    11.     float horizontalMove = 0F;
    12.     float Move;
    13.     bool jump = false;
    14.     bool crouch = false;
    15.  
    16.     void Udate()
    17.  
    18.     {
    19.  
    20.         horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;
    21.  
    22.         if (Input.GetButtonDown("Jump"))
    23.  
    24.         {
    25.             jump = true;
    26.  
    27.  
    28.         }
    29.         if (Input.GetButtonDown("Crouch"))
    30.  
    31.         {
    32.             crouch = true;
    33.  
    34.         }
    35.         else if (Input.GetButtonUp("crouch"))
    36.  
    37.         {
    38.             crouch = false;
    39.  
    40.         }
    41.  
    42.     }
    43.  
    44.  
    45.     void FixedUpdate()
    46.  
    47.     {
    48.  
    49.         controller.Move (horizontalMove * Time.fixedDeltaTime, crouch, jump);
    50.         jump = false;
    51.  
    52.     }
    53.  
    54. }
     
    Last edited: Feb 4, 2020
  2. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    3,358
    Watch your spelling, C# is case sensitive. You wrote:
    • Udate() instead of Update(),
    • "crouch" and "Crouch"; only one of them is correct.
    If you had carefully read your script, you would have noticed that.
     
  3. nelso52879

    nelso52879

    Joined:
    Jan 29, 2020
    Posts:
    6

    thank you it helped me.
     
unityunity