Guest User

Untitled

a guest
Jan 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public GroundItem itemToLoot(final int...ids) {
  2. GroundItem[] loot = GroundItems.getLoaded();
  3. GroundItem lootit = null;
  4. int Dist = 20;
  5. for (GroundItem N : loot) {
  6. for (int id : ids) {
  7. if ( N.getItem() == id) {
  8. int distanceToLoot = Calculations.distanceTo(N);
  9. if (distanceToLoot < Dist) {
  10. lootit = N;
  11. }
  12. }
  13. }
  14. }
  15. return lootit;
  16. }
  17.  
  18.  
  19. De volgende error: Incomptable operand types Item and int
  20. bij if ( N.getItem() == id)
Add Comment
Please, Sign In to add comment