Nice guide, Will use, But this is a snippet .
|
----
Nice guide, Will use, But this is a snippet .
Very nice.I can't think of a better way to do it then this.
Lol how is this good fight? This isn't it anyway.
Lines mean nothing, you can write an entire server on 1 line if you wanted to, its the conventions and efficiency of the code that matters.
You can do this the real way, and the much better way with about 5 or 6 lines.
with those extra 5 lines you will save yourself alot of trouble.
doesnt work for me, when i add disconnect = false i get 100 errors.
Code:public int xlogFix = 0;Code:if (xlogFix == 1){ disconnected = true; }Code:if (xlogFix > 0) { xlogFix--; }Code:if (numBytesInBuffer > 0) { try { out.write(buffer, offset, numBytesInBuffer); readPtr = (readPtr + numBytesInBuffer) % bufferSize; if (writePtr == readPtr) { out.flush(); } } catch (java.net.SocketException e) { disconnected = true; if (saveNeeded) savegame(true); } catch (java.lang.Exception __ex) { server.logError(__ex.getMessage()); disconnected = true; if (saveNeeded) savegame(true); } } } disconnected = false; }Code:if(!logoutButton && inCombat) { disconnected = false; xlogFix = 30; }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |