Simple question (call function from another class)

Discussions about Coding and Scripting
Post Reply
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Simple question (call function from another class)

Post by iloveut99 »

Hi,

How do I call a function from another class, in the same "package"?

In java we used import ourneedclass; and then we called ourneedclass.ourneedfun();
Meindratheal
Average
Posts: 61
Joined: Thu Jun 03, 2010 3:53 pm

Re: Simple question (call function from another class)

Post by Meindratheal »

You can declare the function as a static function, then call it like this:

Code: Select all

class'ClassName'.static.YourFunction(parameters);
iloveut99
Skilled
Posts: 231
Joined: Mon Aug 16, 2010 10:25 pm

Re: Simple question (call function from another class)

Post by iloveut99 »

Nice! Thanks. ;)
Post Reply