| Blockland Forums > Modification Help |
| What the hell is wrong with this tcp object? |
| << < (2/2) |
| Lugnut:
no one? :panda: |
| Brian Smithers:
--- Quote from: Lugnut1206 on March 28, 2012, 01:57:50 PM ---no one? :panda: --- End quote --- I would look at Truce's webserver for reference. |
| Lugnut:
--- Quote from: Brian Smithers on March 28, 2012, 03:05:19 PM ---I would look at Truce's webserver for reference. --- End quote --- It seems a few things are improperly defined in my script. I made some adjustments which I'll go test now. I'll also go test the tcpclient cause that might actually be working, and it was just my server that was messed up Nope. --- Code: ---package LUGSTCPOBJECT { function TCPObject::onLine(%this, %line) { if(%this.class $= "lugsTCPServ") { echo(%this); echo(%line); %mode = getword(%line, 0); echo(%mode); %msg = strReplace(%line, getword(%line, 0), ""); echo(%msg); switch$(%mode) { case "CHAT:": echo("SRVR:CHAT:" SPC %msg); case "WARNMSG": warn("SRVR:WARN:" SPC %msg); case "TALKMSG": commandToServer('messageSent', %msg); default: echo("SRVR:Message received, unknown mode:" SPC %line); } return; } parent::onLine(%this, %line); } }; activatepackage(LUGSTCPOBJECT); --- End code --- tried that, tried without the %this.class part, tried without package At least now it isn't giving me a RTB error. |
| Navigation |
| Message Index |
| Previous page |