3 Replies Latest reply on Dec 11, 2015 6:19 AM by joel_pau

    using arguments in getSymbol

    ryan_pu Level 1

      I'm trying to make a script a function but am having trouble.

       

          test("extinguisherYellow", "DZ_Yellow");

          function test(a, b){

           //alert(a);

           //alert(b);

           var targets = sym.getSymbol(a);

           var boxes = sym.getSymbol(b);

           alert(targets);

           alert(boxes);

           //a.deleteSymbol();

           //b.deleteSymbol();

           }

      They results in empty arguments.

       

          test("extinguisherYellow", "DZ_Yellow");

           function test(a, b){

           //alert(a);

           //alert(b);

           //var targets = sym.getSymbol(a);

           //var boxes = sym.getSymbol(b);

         

           alert(a);

           alert(b);

           a.deleteSymbol();

           b.deleteSymbol();

      }

      That works but would doesn't help me learn what I am trying to. Any of you know how to add arguments into variables?