How to import a variable from class to another class?

Discussion in 'Plugin Development' started by Blacktiger07, Nov 30, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Blacktiger07

    Title says what i mean ;)
     
  2. Offline

    Lolmewn

    In that other class, make a method, something like getVariable()
    let it return the value, and you're done!

    You can also make the variable public (put public in front of it) and then you can access it through other classes.
     
  3. Offline

    Blacktiger07

    okay thanks
     
  4. Offline

    ItsHarry

    If you don't make instances of it, make it static. Otherwise, do what Lolmewn said.
     
Thread Status:
Not open for further replies.

Share This Page