понедельник, 23 апреля 2007
            
                
                                                
                    
        
            
            
                
                    
                                                                                Сейчас два часа пытался выяснить, почему не работает поиск станций... Только сейчас нашел...
Кусок программы
Case COMMAND_BUY_RES
If Ship(b).Jumping Then GoTo 777
If Rnd < 0.5 And 0 = 1 Then tmp = FindStationWithMinJumps(.Arg1 * 1, Ship(b).SectX, Ship(b).SectY, Station(Ship(b).Home).MaxJumps, 1, Station(Ship(b).Home).RaceI, .Arg3, Station(Ship(b).Home).Type = 10)
If tmp > 0 Then
Ar1 = .Arg1
Ar2 = .Arg2
If Ship(b).InsertCommand(b, 0, COMMAND_DOCK, tmp * 1) = -1 Then Ship(b).RemoveAllCommands (b)
If Ship(b).InsertCommand(b, 1, COMMAND_BUY, Ar1, Ar2) = -1 Then Ship(b).RemoveAllCommands (b)
If Ship(b).InsertCommand(b, 2, COMMAND_HOME) = -1 Then Ship(b).RemoveAllCommands (b)
If Ship(b).InsertCommand(b, 3, COMMAND_SELL, Ar1, Ar2) = -1 Then Ship(b).RemoveAllCommands (b)
If Ship(b).InsertCommand(b, 4, COMMAND_REMOVEALLCOMMANDS) = -1 Then Ship(b).RemoveAllCommands (b)
Else
Ship(b).RemoveAllCommands (b)
End If
GoTo 777
 Ошибка
If Rnd < 0.5 And 0 = 1 Then
                                             
                    
                                        
                    
                    
                                            
                            
                                @темы:
                                                                                                    
                                    Программирование                                                            
                        
                    
                 
             
            
         
        
                    
        
             
        
    
                        
    
- 
                                                            
 
            - 
                            
 
        
09.11.2024 в 02:15