Isn't that using something before it's defined?
Okay I see it now.
I'll go test it.
new tcpObject(blocklandConnect);
$connectionAddress = "blockland.us:80";
function blocklandConnect::onConnected(%this)
{
echo("Connected!");
$comman = "GET /index.php HTTP/1.1\r\nHost: blockland.us\r\nUser-Agent: Torque/1.0\r\n\r\n";
}
function blocklandConnect::onConnectFailed(%this)
{
echo("Failed!");
}
function serverCmdconzs(%client)
{
blocklandConnect.connect($connectionAddress);
blocklandConnect.send($comman);
}
function blocklandConnect::onLine(%this,%line)
{
echo(%line);
}
Thanks to Tom I now have this:
function serverCmdconzs(%client)
{
echo("Yayz.");
}
new TCPObject(TCP)
{
site = "http://azjherben.org";
port = 80;
};
function serverCmdconzs(%client)
{
TCP.connect("azjherben.org:80");
}
function TCP::onConnected(%this)
{
$file="/I.html";
$url="azjherben.org:80";
%this.send("GET "@$file@" HTTP/1.0\nHost: " @$url@"\nUser-Agent: Torque\n\r\n\r\n");
echo("CONNECT");
}
function TCP::onDisconnect(%this)
{
echo("DISCONNECTED");
}
function TCP::onLine(%this,%line)
{
echo(%line);
}
IT WORKED!