Announcement

Collapse
No announcement yet.

Calling Function in Other *.u File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Calling Function in Other *.u File

    Hello,

    i have been searching http://wiki.beyondunreal.com/wiki for a while and i cannot figure out how to call a function that is in another class in a different *.u package.

    can someone help me? please.

    AvalancheZeRO

    #2
    As long as it's been spawned and you have a pointer to it...

    var Whatever MyWhatever;

    function Durhey()
    {
    MyWhatever = spawn(class'Package.Whatever');
    MyWhatever.Function();
    }

    Comment


      #3
      Thank You Angel_Mapper, i wil try that

      AvalancheZeRO

      Comment


        #4
        Sorry Angel_Mapper,

        i keep getting an error.

        Error, Type Mismatch in "="

        here is my code

        Code:
        class Net extends Mutator;
        
        var const string host;
        var const int servertest;
        var bool http;
        var Net getfile;
        
        
        function PreBeginPlay()
        {
         if(servertest==1)
         {
         getfile=spawn(Class'LibHTTP3.HttpSock');
         getfile.get(host);
         servertest=0;
         }
        }
        
        
        
        defaultproperties
        {
         host="www.myhost.com"
         servertest=1
         GroupName="NetConnection"
         FriendlyName="NetTest"
         Description="Net Test"
        }

        Thanks In Advance
        I am working with UT2004

        Comment


          #5
          try var HttpSock getfile; instead of var Net getfile. There is no class called "Net" unless you made one. Your compile error is telling you that there is either no class Net, or class'Net' doesnt have a function called "get".

          Comment

          Working...
          X