View Single Post
  #4  
Old 02-04-2009, 02:25 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Quote:
Originally Posted by Loriel View Post
I would be happy with a non-dynamic, compile-time, include-style alternative to join, for my situation. (I am not sure whether you are suggesting to modify join, or add an 'import' compile-time-function, or.)
import is something he added awhile ago to the GServers.

You make the class "foo.bar" and you can do stuff like

PHP Code:
public function Bar() {
  return 
this;
}
public function 
getSomething() {
  return 
2;

And then elsewhere:

PHP Code:
import foo.bar;
function 
onPlayerEnters() {
  
temp.myBar = new Bar();
  echo(
temp.myBar.getSomething()); // echos 2

I'm guessing this is done at compile-time, so your enums would work as well if Stefan were to make the changes.
Reply With Quote