Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by SROZOne · Jun 11, 2014 at 06:58 PM · errorbce0023

Unity ERROR BCE0023

Unity ERROR: Assets/Scripts/networking.js(66,61): BCE0023: No appropriate version of 'UnityEngine.GUI.BeginScrollView' for the argument list '(UnityEngine.Rect, String, UnityEngine.Rect)' was found.

My Script:

 @script ExecuteInEditMode()
 
 var gameName : String = "Mattsgamesfortesting";
 
 var refreshing = false;
 var hostData : HostData[];
 
 var create = false;
 var joining = false;
 
 var serverName = "";
 var serverInfo = "";
 var serverPass = "";
 
 var playerName = "";
 
 var clientPass = "";
 
 var scrollPosition = "";
 
 function Start(){
 
     playerName = PlayerPrefs.GetString("Player Name");
 }
 
 function OnGUI(){
 
     if(!Network.isClient && !Network.isServer){
 
         if(GUI.Button(Rect(Screen.width/2 - 50,Screen.height/2,100,20),"Create Game")){
 
             create = true;
         }
 
         if(GUI.Button(Rect(Screen.width/2 - 50,Screen.height/2 + 30,100,20),"Create Game")){
 
             joining = true;
             refreshHostList();
         }
     }
 
 if(create){
 
     if(GUI.Button(Rect(Screen.wigth/2 - 50,Screen.height/3 + 110,100,50),"Create")){
 
         startServer();
     }
 
     GUI.Label(Rect(Screen.width/2 - 110,Screen.height/3,100,20),"Server Name:");
     GUI.Label(Rect(Screen.width/2 + 40,Screen.height/3,100,20),"Password:");
     GUI.Label(Rect(Screen.width/2 - 30,Screen.height/3 + 90,100,20),"Server Info:");
 
     serverName = GUI.TextField (Rect(Screen.width/2 - 120,Screen.height/3 + 30, 100, 20),serverName, 12);
     serverPass = GUI.PasswordField (Rect(Screen.width/2 + 20,Screen.height/3 + 30, 100, 20),serverPass, "*"[0], 12);
     serverInfo = GUI.TextField (Rect(Screen.width/2 - 70,Screen.height/3 + 30, 150, 20),serverInfo, 12);
 
     if(GUI.Button(Rect(Screen.width/1.2,Screen.height/20,100,20),"Back")){
 
         create = false;
     }
 
     if(joining){
 
         if(hostData){
 
             scrollPosition = GUI.BeginScrollView(Rect(Screen.width/4,Screen.height/6,Screen.width/1.5,Screen.height/2),scrollPosition, Rect(0, 0, 300, 1000/*hostData.Length * 30*/));
             GUI.Label(Rect(30,0,100,20),"Game Name");
             GUI.Label(Rect(350,0,100,20),"Server Info");
             GUI.Label(Rect(590,0,100,20),"Player Count");
             GUI.Label(Rect(700,0,100,20),"Password");
 
             for (var i:int = 0; i < hostData.length; i++){
 
                 GUI.Label(Rect(0,30 + i * 30,200,22),hostData[i].gameName);
                 GUI.Label(Rect(160,30 + i * 30,500,22),hostData[i].comment);
                 GUI.Label(Rect(640,30 + i * 30,100,22),hostData[i].connectedPlayers + " / " + hostData[i].playerLimit);
 
                 if(hostData[i].passwordProtected){
 
                     clientPass = GUI.PasswordField(Rect(680, 30 + i * 30, 100, 25), clientPass, "*"[0], 12);
                 }
 
                 if(GUI.Button(Rect(800, 30 + i * 30, 100, 25), "Join")){
                     
                     Network.Connect(hostData[i], clientPass);
                 }
             }
             GUI.EndScrollView();
         }
 
         if(!hostData){
 
             GUI.Label(Rect(Screen.width/2 - 50,Screen.height/3,200,25), "No Games Found");
 
             if(GUI.Button(Rect(Screen.width/2 - 50,Screen.height/3 + 30,105,25),"Refresh")){
                 refreshHostList();
             }
         }
         
         if(GUI.Button(Rect(Screen.width/1.2,Screen.height/20,100,20),"Back")){
 
             joining = false;
         }
     }
 
         if(GUI.Button(Rect(Screen.width/20,Screen.height/20,100,20),"Quit")){
 
             Application.Quit();
         }
 
         GUI.Label(Rect(Screen.width/2 - 35,Screen.height/1.2 - 30,100,20),"Your Name:");
         playerName = GUI.TextField(Rect(Screen.width/2 - 50,Screen.height/1.2,100,20), playerName, 12);
         }
     }
 
     function Update (){
 
         if(refreshing){
 
             if(MasterServer.PollHostList().Length > 0){
 
                 refreshing = false;
                 hostData = MasterServer.PollHostList();
             }
         }
     }
 
     function startServer(){
 
         if(serverPass != ""){
 
             Network.incomingPassword = serverPass;
         }
 
         Network.InitializedServer(15,25001, !Network.HavePublicAddress);
         MasterServer.RegisterHost(gameName,serverInfo);
     }
 
     function OnServerInitialized(){
 
         DontDestroyOnLoad(transform.gameObject);
 
         Application.LoadLevel ("Lobby");
 
         lobbySpawn();
     }
 
     function OnConnectedToServer(){
 
         lobbySpawn();
     }
     
     function lobbySpawn(){
 
         yield WaitForSeconds(0.1);
 
         var made = Network.Instantiate(playerPrefab, transform.position, transform.rotation, 0);
 
         made.GetComponent(playerMove).playerName = playerName;
 
         PlayerPrefs.SetString("Player Name").playerName;
 
         if(Network.isClient){
 
             Destroy(this);
         }
     }
 
     function refreshHostList(){
 
         MasterServer.ClearHostList();
         MasterServer.RequestHostList(gameName);
         refreshing = true;
     }
Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jeff-Kesselman · Jun 11, 2014 at 06:59 PM 0
Share

In the future please ensure your code is properly formatted. I have fixed this post for you bit future posts may get rejected if not properly formatted.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Jeff-Kesselman · Jun 11, 2014 at 07:02 PM

Your error is exactly what it says it is. On like 66 you are passing arguments of the wrong type to BeginScrollView

Please compare the arguments you are passing, which the error says is (Rect,string,Rect) with the documentation on proper use:

http://docs.unity3d.com/ScriptReference/GUI.BeginScrollView.html

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SROZOne · Jun 11, 2014 at 07:43 PM 0
Share

can u tell me how to fix?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Script error: No appropriate version of 'UnityEngine.Transform.TransformDirection' for the argument list '(System.Type)' was found 2 Answers

Instantiate GameObjects, brings an error to the log... 2 Answers

script gets this error: (6,20): BCE0023: No appropriate version of 'UnityEngine.Object.Instantiate' for the argument list '(UnityEngine.Transform, System.Object)' was found. 2 Answers

Translating from game space to view space 2 Answers

sound on button press error + its firing when space is pressed 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges