u already answered ur own question bro
|
I have that so far, but I need to make it determine what 'h' is, i want that to be the different herb id's, how would I do that?Code:case 3021: for(int i = 0;i < 9999;i++){ for(int h = 0;h < 9999;h++){ if (c.getItems().playerHasItem(h, i)) { c.getItems().deleteItem(h, i); c.getItems().addItem(h, i); } } } break;
just like int h = {ID, ID, ID, ID};
or something?
Code:int[] herbs = {1,2,3,4}; for(int i = 0;i < herbs.length;i++){ if (c.getItems().playerHasItem(herbs[i], amount)) { c.getItems().deleteItem(herbs[i], amount); c.getItems().addItem(whateveritemuwannaadd, amount); } } }
Integer 'h1' is not Declared. The Array name is already being used for another Integer Variable. You should know how fix such a Simple Problem.
(I'm referring to this: http://i.imgur.com/JMfpDoj.png)
I had it as h before but it wasn't working and eclipse said to change it to h1 so i did, that didn't do anything at all, so I just screenied there. I knew in the pic it wasn't declared, but when h was declared it didn't make a difference to h1, so i didn't bother changing.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |