Advertisement
SirBaconBitz

Untitled

May 25th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.15 KB | None | 0 0
  1. So, first this is run once:
  2. carriage.move(dir,false,false)
  3.  
  4. dir is the direction it goes in
  5. false is dont simulate, actually move
  6. second false is to move the controller with it.
  7.  
  8. My best guess is it then gets passed to this:
  9. public Object[] callMethod( IComputerAccess computer, ILuaContext context, int MethodIndex, Object[] Arguments ) throws Exception{
  10.         try
  11.         {
  12.             switch ( Commands . values ( ) [ MethodIndex ] )
  13.             {
  14.                 case move :
  15.  
  16.                     AssertArgumentCount ( Arguments , 3 ) ;
  17.  
  18.                     SetupMotion ( ParseDirectionArgument ( Arguments [ 0 ] ) , ParseBooleanArgument ( Arguments [ 1 ] , "simulation" ) , ParseBooleanArgument ( Arguments [ 2 ] , "anchoring" ) ) ;
  19.  
  20.                     break ;
  21.  
  22.                 case anchored_move :
  23.  
  24.                     AssertArgumentCount ( Arguments , 1 ) ;
  25.  
  26.                     SetupMotion ( ParseDirectionArgument ( Arguments [ 0 ] ) , false , true ) ;
  27.  
  28.                     break ;
  29.  
  30.                 case check_anchored_move :
  31.  
  32.                     AssertArgumentCount ( Arguments , 1 ) ;
  33.  
  34.                     SetupMotion ( ParseDirectionArgument ( Arguments [ 0 ] ) , true , true ) ;
  35.  
  36.                     break ;
  37.  
  38.                 case unanchored_move :
  39.  
  40.                     AssertArgumentCount ( Arguments , 1 ) ;
  41.  
  42.                     SetupMotion ( ParseDirectionArgument ( Arguments [ 0 ] ) , false , false ) ;
  43.  
  44.                     break ;
  45.  
  46.                 case check_unanchored_move :
  47.  
  48.                     AssertArgumentCount ( Arguments , 1 ) ;
  49.  
  50.                     SetupMotion ( ParseDirectionArgument ( Arguments [ 0 ] ) , true , false ) ;
  51.  
  52.                     break ;
  53.             }
  54.         }
  55.         catch ( Throwable Throwable )
  56.         {
  57.             throw ( new Exception ( "no such command" ) ) ;
  58.         }
  59.  
  60.         Error = null ;
  61.  
  62.         Obstructed = false ;
  63.  
  64.         try
  65.         {
  66.             while ( MotionDirection != null )
  67.             {
  68.                 wait ( ) ;
  69.             }
  70.        
  71.         }
  72.         catch ( Exception exc )
  73.         {
  74.             //exc.printStackTrace();
  75.         }
  76.  
  77.         if ( Error == null )
  78.         {
  79.             return ( new Object [ ] { true } ) ;
  80.         }
  81.  
  82.         if ( Obstructed == false )
  83.         {
  84.             return ( new Object [ ] { false , Error . getMessage ( ) } ) ;
  85.         }
  86.  
  87.         return ( new Object [ ] { false , Error . getMessage ( ) , ObstructionX , ObstructionY , ObstructionZ } ) ;
  88.     }
  89.  
  90. The first time around everything works fine, but the second time, using the EXACT SAME function, without the program even running, the "no such command" exception is thrown.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement