- Home /
 
               Question by 
               KillTheCrawler · Jun 01, 2013 at 06:34 PM · 
                guimultiplayerlobby  
              
 
              GUI Not displaying itselfe in Multiplayer lobby
Hi. I am making an online FPS game and something is wrong. I'm not getting any errors but my GUI in the Lobby is not working. Here is the code:
 #pragma strict
 
 var Players : GameObject[];
 
 var LevelsLoaded : int = 0;
 
 var CurMap : String = "SmallTown";
 var CurGameMode : String = "TDM";
 
 var SMap : boolean = false;
 var SMode : boolean = false;
 
 var StartTime : int = 5;
 var StartingMatch : boolean = false;
 
 function Awake () 
 {
     networkView.group = 1;
 }
 
 function onGUI () 
 {
     GUI.Label(Rect(10, 10, 90, 30),"LOBBY");
     if(GUI.Button(Rect(10, 40, 90, 30), "Start Match"))
     {
         StartMatch();
     }
     if(GUI.Button(Rect(10, 90, 90, 30), "Select Map"))
     {
         SMap = true;
     }
     if(SMap == true)
     {
         GUI.Box(Rect(120, 0, 100, Screen.height), "Maps");
         if(GUI.Button(Rect(125, 20, 90, 25), "Small Town"))
         {
             CurMap = "SmallTown";
             SMap = false;
         }
     }
     if(GUI.Button(Rect(10, 125, 90, 30),"Select Mode"))
     {
         SMode = true;
     }
     if(SMode == true)
     {
         GUI.Box(Rect(120, 0, 100, Screen.height), "GameModes");
         if(GUI.Button(Rect(125, 20, 90, 25),"TeamDeathMatch"))
         {
             CurGameMode = "TDM";
             SMode = false;
         }
     }
     
     if(StartingMatch == true)
     {
         GUI.Label(Rect(Screen.width-150,Screen.height-25,150,25),"Match Starts In: " + StartTime);
     }
 }
 
 function StartMatch ()
 {
     StartingMatch = true;;
     yield WaitForSeconds(1);
     StartTime --;
     yield WaitForSeconds(1);
     StartTime --;
     yield WaitForSeconds(1);
     StartTime --;
     yield WaitForSeconds(1);
     StartTime --;
     yield WaitForSeconds(1);
     StartTime --;
     Network.RemoveRPCsInGroup(0);
     Network.RemoveRPCsInGroup(1);
     networkView.RPC("StartGame", RPCMode.AllBuffered, CurMap, LevelsLoaded);
 }
 
 @RPC
 function StartGame ()
 {
     Debug.Log("Load: " + CurMap);
 }
It is attached to an Empty -by the way- and I am very confused why the GUI does not show up!!! Please help.
               Comment
              
 
               
              Answer by JJNCreator · Feb 02, 2015 at 04:22 PM
I see a typo in line 21.
 function onGUI () 
Try doing this
 function OnGUI () 
Your answer
 
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
question with gui 2 Answers
GUI problem 1 Answer
Full Screen Get smaller when i actived it 1 Answer
Pause Menu background problem 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                