Question by 
               Stentub · Sep 12, 2015 at 10:55 PM · 
                scripting problemscript errorif statementunexpected token  
              
 
              Unexpected token: if HELP
i have one error in my script and its this one I I V
Assets/money.js(26,1): BCE0043: Unexpected token: if.
any help will be appreciated
this is my script:
 #pragma strict
  var store = false;
  static var click = 0;
  var money = 500;
  function Start () 
  {
 
  }
 
  function Update () 
  {
  if (Input.GetKeyDown (KeyCode.Escape))
  {
  store = true;
  }
  if (store == true)
  {
  storeopen();
  }
  }
 
  function storeopen () 
  {
  if (GUI.Button(Rect(10,10,50,50),"Seeder"));
  {
  if (money == 100);
  {
  money : 100};
 
  yield WaitForSeconds (2);
  money = 900;
  }
 
               Comment
              
 
               
              Answer by Wolfshadow · Sep 13, 2015 at 01:35 AM
 pragma strict
 var store = false; static var click = 0; var money = 500; function Start () {
 
 }
 
 function Update () { if (Input.GetKeyDown (KeyCode.Escape)) { store = true; } if (store == true) { storeopen(); } }
 
 function storeopen () { if (GUI.Button(Rect(10,10,50,50),"Seeder")); { if (money == 100); { money : 100};
 
 yield WaitForSeconds (2); money = 900; }
I am not a js expert, but this can help visualize
Oh, in line function storeopen, you are missing a bracket.
can you put it in for me? im very new to javascript and i have no idea where to put it
Your answer
 
 
             