Forum Discussion

william_roe's avatar
william_roe
Super Contributor
10 years ago
Solved

Calling Function in Specific Script File

I have a function with the same name in multiple script files. How do I specifically designate the intended script file? Intellisense doesn't show all script files. Must the function names be unique ...
  • HKosova's avatar
    HKosova
    10 years ago

    william_roe wrote:

    Intellisense doesn't show all script files.


    You need //UNEUNIT UnitName to call functions from other units, and for those units to appear in the Code Completion.

     

    [JScript]

    //USEUNIT Unit2 //USEUNIT Unit3 function Main() { Test(); // Runs the Test() function from the current unit Unit2.Test(); Unit3.Test(); }

    william_roe wrote:

    Must the function names be unique across all script files?


    No. But it's a good idea to keep them unique.