Jump to content

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • 3 weeks later...
  • 2 weeks later...
Posted

Good job my friend but you must fix something because if you start your pin with "0" and for example you have the pin "0123", in your txt file you will have the pin "123" not "0123"!

Sorry if i am wrong! :)

 

try this:

	    	  StringTokenizer st = new StringTokenizer(command);
	    	  st.nextToken();
	    	  String a-beep-t = null;
                     -    int pin1 = 0;
            	     -    int pin2 = 0;
	     -    int pin3 = 0;
	     -    int pin4 = 0;
                     +    String pin1 = null;
	     +    String pin2 = null;
	     +    String pin3 = null;
	     +    String pin4 = null;
	    	  String message = "";
	    	  
	    	  try
	    	  {
	    		 a-beep-t = st.nextToken();
	            -    pin1 = Integer.parseInt(st.nextToken());
	    	    -    pin2 = Integer.parseInt(st.nextToken());
	    	    -    pin3 = Integer.parseInt(st.nextToken());
	    	    -    pin4 = Integer.parseInt(st.nextToken());
                            +    if (st.hasMoreTokens()) pin1 = st.nextToken();
                            +    if (st.hasMoreTokens()) pin2 = st.nextToken();
                            +    if (st.hasMoreTokens()) pin3 = st.nextToken();
                            +    if (st.hasMoreTokens()) pin4 = st.nextToken();
	    		 while(st.hasMoreTokens())
	    			 message = message + st.nextToken() + " ";

Posted

can you guys share this (change the imports and all things needed) to l2jserver project? i tryed but I still get an error with L2FolkInstance and dont know how to fix it. thanks

  • 2 months later...
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock