Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Code Help

Discussion in 'Scripting' started by lewisilyas42, Nov 23, 2021.

  1. lewisilyas42

    lewisilyas42

    Joined:
    Aug 21, 2021
    Posts:
    11
    So is was following this tut
    but at 15:16 the rest of the code cuts off the screen dose anybody know what comes after Photon.Hastable ???
    i just guessed the ) went there.

    Code (CSharp):
    1.  public override void OnPlayerPropertiesUpdate(Player targetPlayer, ExitGames.Client.Photon.Hashtable)
    2.     {
    3.         if (player == targetPlayer)
    4.         {
    5.             UpdatePlayerItem(targetPlayer);
    6.         }
    7.     }
     
  2. LilFire

    LilFire

    Joined:
    Jul 11, 2017
    Posts:
    74
    You need a name for this hashtable parameter
     
  3. lewisilyas42

    lewisilyas42

    Joined:
    Aug 21, 2021
    Posts:
    11
    How would I name this parameter ???
     
  4. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    It's a parameter. The same as any other parameter that is part of the method signature. If that doesn't make sense, then you might want to view some basic c# tutorials as that will help you greatly.

    But unless the rest of the code shows you what name they used, it doesn't really matter what you choose.
     
  5. lewisilyas42

    lewisilyas42

    Joined:
    Aug 21, 2021
    Posts:
    11
    I mean I was following the tut above but the code goes of screen and I don't know if something else goes there i try to name it but i just end up with 8 more errors
     
  6. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    Getting 8 more errors doesn't mean your errors have anything to do with what you name this parameter.

    The method also shows override, which means it's overriding another method. That should give you some ideas on what to look for.

    It looks like that Youtuber sells their course on Udemy, so if you can't get where you want by the Youtube videos alone, you may need to buy their course.