TeamSelect

Garrett Tiller 6 Reputation points
2020-04-21T05:39:27.137+00:00

Im using Unity and Xbox Live to make a sports game with a team selection screen similar to Madden

What I'm trying to do is have the controller/player to choose a side

                if (playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = homeTeam)
                {
                    if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= v >= 0.01)
                    {
                        homeTeam.GetComponent<TeamSelection>().ToggleLeft();
                    }
                    else if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= v <= -0.01)
                    {
                        homeTeam.GetComponent<TeamSelection>().ToggleRight();
                    }
                   if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = h >= 0.01)
                    {
                        playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = homeTeam();
                    }
                }
                if ( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= roadTeam)
                {
                    if ( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = v >= 0.01)
                    {
                        roadTeam.GetComponent<TeamSelection>().ToggleLeft();
                    }
                    else if ( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber= v <= -0.01)
                    {
                        roadTeam.GetComponent<TeamSelection>().ToggleRight();
                    }
                   if( playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = h <= -0.01)
                    {
                        playerOne.GetComponent<PlayerAuthentication>().PlayerNumber = homeTeam();
                    }
                }

I keep getting this error

Error CS0029 Cannot implicitly convert type 'UnityEngine.GameObject' to 'int'

What did I get wrong?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,992 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Roy Li - MSFT 31,826 Reputation points Microsoft Vendor
    2020-04-21T07:23:08.14+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Microsoft Q&A is under a public preview now. Not all topics are supported now. The supported topics are listed on the right top.

    Questions about Unity and Xbox Live is not supported now. Please ask this question in Xbox Live Development Forum.

    Thank you!

    0 comments No comments