order_cmd.c
changeset 294 75aee285ca75
parent 193 0a7025304867
child 340 57ae229c5402
equal deleted inserted replaced
293:51e52423934f 294:75aee285ca75
   390 				//I uncommented this in order not to get two error messages
   390 				//I uncommented this in order not to get two error messages
   391 				//when two identical entries are in the list
   391 				//when two identical entries are in the list
   392 				n_st++;
   392 				n_st++;
   393 				st = DEREF_STATION(order >> 8);
   393 				st = DEREF_STATION(order >> 8);
   394 				required_tile = GetStationTileForVehicle(v,st);
   394 				required_tile = GetStationTileForVehicle(v,st);
       
   395 				if (!required_tile) problem_type = 3;
   395 			}
   396 			}
   396 			old_order = order; //store the old order
   397 			old_order = order; //store the old order
   397 		}
   398 		}
   398 
   399 
   399 		//Now, check the last and the first order
   400 		//Now, check the last and the first order
   401 		if ( (v->schedule_ptr[0] == v->schedule_ptr[i-2]) && ( i-2 != 0 ) ) {
   402 		if ( (v->schedule_ptr[0] == v->schedule_ptr[i-2]) && ( i-2 != 0 ) ) {
   402 			problem_type = 2;
   403 			problem_type = 2;
   403 		}
   404 		}
   404 
   405 
   405 		if (n_st < 2) problem_type = 0;
   406 		if (n_st < 2) problem_type = 0;
   406 
       
   407 		if (!required_tile) problem_type = 3;
       
   408 
   407 
   409 		SET_DPARAM16(0, v->unitnumber);
   408 		SET_DPARAM16(0, v->unitnumber);
   410 
   409 
   411 		message = (STR_TRAIN_HAS_TOO_FEW_ORDERS) + (((v->type) - VEH_Train) << 2) + problem_type;
   410 		message = (STR_TRAIN_HAS_TOO_FEW_ORDERS) + (((v->type) - VEH_Train) << 2) + problem_type;
   412 
   411