Thread: Instead of using these servers like most people did with winterlove servers...

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Instead of using these servers like most people did with winterlove servers... 
    xStanyer
    Guest
    Accidentally deleted the whole post, and i cba writing it all out again ;/

    So basically instead of using the traditional winterlove style coding, try your best as developers to document your code etc, for example the command class atm fails, i rewrote it to this for now, remember this is just an example i'm not after criticism lol;

    Code:
    /**
    * @description Manages the packet sent by the client which occurs when the player types a message starting with "::".
    * @author Stanyer
    **/
     
    import java.net.*;
    import java.io.*;
    
    public class packet_command
    {
    	
    	public packet_command(String c, rs_player p)
    	{
    		/**
    		* @param c: the text which follows on after the "::" part of the string.
    		* @param p: the rs_player instance.
    		**/
    		try
    		{
    			c = c.trim();
    			if(c.length() > 0)
    			{
    				/*
    				* You can now use if statement's to set differant outputs for differant values of the string c.
    				*/
    			}
    			else
    			{
    				/*
    				* There is no point checking if the command matches a set command as it doesn't have any value.
    				*/
    			}
    		}
    		catch(Exception _ex)
    		{
    			/*
    			  * What to do if an error occurs.
    			  */
    		}
    	}
    	
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Unborn's Avatar
    Join Date
    Dec 2007
    Age
    28
    Posts
    516
    Thanks given
    1
    Thanks received
    3
    Rep Power
    317
    Mate, I'm pretty sure you cant use switch with Strings....


    Reply With Quote  
     

  3. #3  
    killer75230
    Guest
    LOL, Sir p00n ftw =()
    Reply With Quote  
     

  4. #4  
    xStanyer
    Guest
    Updated the first post, and i accidentally deleted the few paragraphs i wrote out, dumb much, lawl.
    Last edited by xStanyer; 07-13-2008 at 04:40 PM. Reason: Double posting is not allowed!
    Reply With Quote  
     

  5. #5  
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393
    or just rebuild the hole 474 like i am doing
    Reply With Quote  
     

  6. #6  
    xStanyer
    Guest
    Yeah that's what i'm doing too, this is my own command class lol i was just simply stating that instead of using the style winterlove servers and most 317/377 servers use we need to fully document them and follow conventions etc.
    Reply With Quote  
     

  7. #7  
    Renown Programmer

    Sean's Avatar
    Join Date
    May 2007
    Age
    29
    Posts
    2,758
    Thanks given
    264
    Thanks received
    1,089
    Rep Power
    4393
    only reason im rebuilding is because i dont like cells programmin
    Reply With Quote  
     

  8. #8  
    xStanyer
    Guest
    Neither do i, i hate anyones programming except my own tbh i follow my own conventions i just have a case of ocd.
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Apr 2008
    Posts
    105
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Unborn View Post
    Mate, I'm pretty sure you cant use switch with Strings....
    im pretty sure u can?

    not completely sure lol
    Reply With Quote  
     

  10. #10  
    Quantum Quack

    Eskwyre's Avatar
    Join Date
    Dec 2007
    Age
    29
    Posts
    871
    Thanks given
    3
    Thanks received
    15
    Rep Power
    220
    hm...you mean make it how Rs2DV was...a file for everything you needed..
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •