1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Java- Error- illegal start of expression

Discussion in 'Software Development' started by rayra3, Apr 7, 2010.

Thread Status:
Not open for further replies.
  1. rayra3

    rayra3 Thread Starter

    Joined:
    Apr 7, 2010
    Messages:
    2
    I need help with this, im trying to get a server up and running for a friend and when i go to compile it i have the Error- Illegal start of expression
    Here is what i have

    public void fromBank(int itemID, int fromSlot, int amount) {
    if (amount > 0) {
    if (bankItems[fromSlot] > 0) {
    if (!takeAsNote) {
    if (Item.itemStackable[bankItems[fromSlot] + 1]) {
    if (bankItemsN[fromSlot] > amount) {
    if (addItem((bankItems[fromSlot] - 1), amount)) {
    bankItemsN[fromSlot] -= amount;
    resetBank();
    resetItems(5064);
    }
    } else {
    if (addItem((bankItems[fromSlot] - 1),
    bankItemsN[fromSlot])) {
    bankItems[fromSlot] = 0;
    bankItemsN[fromSlot] = 0;
    resetBank();
    resetItems(5064);
    }
    }
    } else {
    while (amount > 0) {
    if (bankItemsN[fromSlot] > 0) {
    if (addItem((bankItems[fromSlot] - 1), 1)) {
    bankItemsN[fromSlot] += -1;
    amount--;
    } else {
    amount = 0;
    }
    } else {
    amount = 0;
    }
    }
    resetBank();
    resetItems(5064);
    }
     
  2. thingamajig

    thingamajig Banned

    Joined:
    Mar 5, 2005
    Messages:
    6,271
    Well, first you are missing four closing curly brackets.

    Otherwise, I don't see anything obvious but I don't have the declarations for your methods and properties.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/915267

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice