3 Replies Latest reply on Jan 16, 2011 1:02 AM by darka2011

    help error in script

    darka2011

      well for only just started leaning javascript i dont think im doing to bad i have got this script

       

      var f_elven = new Array ();
      f_elven[0] = "Tari Melwasul";
      f_elven[1] = "Galadriel Melwasul";
      f_elven[2] = "Alasse Melwasul";
      f_elven[3] = "Inwe Melwasul";
      f_elven[4] = "Enelya Melwasul";
      f_elven[5] = "Idril Telrunya";
      f_elven[6] = "Luthien Arcamenel";
      f_elven[7] = "Luthien Melwasul";
      f_elven[8] = "Luthien Telrunya";
      f_elven[9] = "Eldarwen Telrunya";
      f_elven[10] = "Ireth Melwasul";
      f_elven[11] = "Ireth Telrunya";
      f_elven[12] = "Ireth Arcamenel";
      f_elven[13] = "Elbereth Arcamenel";
      f_elven[14] = "Luthien Arcamenel";
      f_elven[15] = "Luthien Elensar";

       

       

      var fe = Math.floor(16*Math.random())


      this.getField("character name").value = f_elven[fe];

       

      if (this.getField("race").value = Human){
      if (this.getField("gender").value = Male){
        var h_male = new Array ();
      h_male[0] = "bob";
      h_male[1] = "mathew";
      h_male[2] = "andrew";
      h_male[3] = "stephen";
      h_male[4] = "ben";


      var hm = math.floor(5*Math.random())

      this.getField("character name").value = h_male[hm];}

      else (this.getField("gender").value = Female);{
        var h_female = new Array ();
      h_female[0] = "michelle";
      h_female[1] = "sarah";
      h_female[2] = "skye";
      h_female[3] = "kayla";
      h_female[4] = "louise";

      var hf = Math.floor(5*Math.random())

      this.getField("character name").value = h_female[hf];}
      }

       

      now the problem i have is atm is i get is as follows

       

      ReferenceError: Human is not defined
      30:Field:Mouse Up

       

      im not using any script in the dropdown boxes just added the items in the options list dont know if that matters

       

      so if some one could look at the script for me and offer a complete noob (no scripting known untill yesterday) some advice that would be great