Author Topic: Is there an onEcho type function?  (Read 631 times)

Is there any function one could use to get things that are output into the console, for example, to put them into a string and messageall them?

Package the echo function?


beat me by a second


Looks more like 34 seconds. Anyway, I'm not sure packaging Echo is possible. I thought that it was blocked in some way, at least.

Don't forget to mess with warn(); and error();. They're echo();'s helpful cousins. I forgot if warning is anything special besides grayness, but warning gives a backtrace so you know where it's coming from.

Wait, so I just do something like this:

Code: [Select]
package bob
{
function echo(%msg)
{
messageall("",%msg);
echo(%msg);
}
};
activatepackage(bob);
I know it's missing something, but what?
What's echo's parent?

Code: [Select]
package echoPackage {
  function echo(%txt) {
    messageAll('', %txt);
    Parent::echo(%txt);
  }
};
activatePackage(echoPackage);

I still bet it won't work since it's source code for something important and all that. I think I remember it not working, but meh.

Code: [Select]
package echoPackage {
  function echo(%txt) {
    messageAll('', %txt);
    Parent::echo(%txt);
  }
};
activatePackage(echoPackage);

I still bet it won't work since it's source code for something important and all that. I think I remember it not working, but meh.
That's the same thing I posted, and pretty much exactly an hour ago too.
I must say, I lol'd.

That's the same thing I posted, and pretty much exactly an hour ago too.
I must say, I lol'd.

But you didn't parent it, so it was... I think running itself. Either way, I don't believe it was running the original Echo.

Echo can't be packaged as far as I know.

I'm not overly familiar with the console GUI but you might be able to package a function of it in some way.

Core engine functions such as echo cannot be packaged by the script engine.