line 2007 and 2015
p.s: i dont even code, I just have eyes and I can see where the error is ... use ur eyes m8
|
Could someone tell me what I'm doing wrong here, I thought it was just as simple as copy and paste I thought wrong
https://gyazo.com/f6a011353223489534d0c7f2bc726024
line 2007 and 2015
p.s: i dont even code, I just have eyes and I can see where the error is ... use ur eyes m8
post the error but based off what i can barely see there you either need a return; in the item above it or another } for the item above it ( thats my guess without really seeing the code or error
Most likely, there's one too many brackets in your code, or there are 1 less than needed. Always make sure that you catch the {
& this isn't really rsps related, if I were you I would probably skim through a java tutorial or something. Just give it 10 minutes and you'll know small things like this in the future
one more edit, Royal was actually trying to help you
2011-2013 will not work anyways. You're making a for loop to pick which item to grab, so it looks like it'll loop through each each item. Try using the Random utility.
Random r = new Random(); //Call instance of Random Class
int num = r.nextInt(RandomItems.length);
addItem(RandomItems[num], 1);
You also need a bracket at the end of your for loop as I can see you've placed this code under your class bracket. So the red bracket on the top, remove that one and put it under your method and you should be good.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |