Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    /tmp/21605/fightpick.java:110: ';' expected

    I am new to java today i no this is a very easy error but i just can't find where to place the ; thanx for any help


    /tmp/21605/fightpick.java:110: ';' expected

    ^
    1 error



    public class fightpick extends Methods
    {
    public fightpick(mudclient mc){super(mc);}

    public void MainBody(String Args[])
    {

    Display("Fighter with pickup - QuikSilverBlade");
    int NpcID = StrToInt(Args[0]);
    int FightMode = StrToInt(Args[1]);
    int pick1 = Integer.parseInt(Args[2]);
    int pick2 = Integer.parseInt(Args[3]);
    int pick3 = Integer.parseInt(Args[4]);
    int startx = GetX();
    int starty = GetY();
    while(Running())
    {
    /*
    Fight Method.
    */
    if (GetMode() != FightMode)
    SetMode(FightMode);
    {
    int[] Npc = GetNpcById(NpcID);
    if(Npc[0] != -1)

    {
    AttackNpc(Npc[0]);
    Wait(Rand(3,600));
    }

    int[] item1 = GetItemById(pick1);
    if(item1[0] != -1)

    {
    PickupItemById(item1);
    Wait(Rand(200,500));
    }

    int[] item2 = GetItemById(pick2);
    if(item2[0] != -1)

    {
    PickupItemById(item2);
    Wait(Rand(200,500));
    }
    int[] item3 = GetItemById(pick3);
    if(item3[0] != -1)

    {
    PickupItemById(item3);
    Wait(Rand(200,500));
    }

    }
    int[] Npc = GetNpcById(NpcID);
    if(!InCombat() & Running() & Npc[0] == -1 & (GetX() != startx || GetY() != starty))
    {
    WalkTo(startx,starty);
    Wait(400);
    }

    else
    Wait(Rand(10,20));
    if(GetFatigue() > 95 && Running())
    {
    while(!Sleeping() && Running())
    {
    UseItem(GetItemPos(1263));
    Wait(Rand(1000,2000));
    }
    while(Sleeping() && Running())
    Wait(1000);
    }
    }

    End();
    }

    public void OnChatMessage(String sender, String message)
    {
    /*
    Chat Message Mod Protection.
    */
    if((sender.substring(4).equalsIgnoreCase("mod ") || sender.equalsIgnoreCase("andrew") || sender.equalsIgnoreCase("paul")) && Running())
    {
    Display("A mod was detected!");
    Wait(Rand(2000,5000));
    Speak("Hey " + sender + " back soon, dinner :P");
    Wait(Rand(2000,5000));
    LogOut();
    End();
    }
    }

    public void OnPrivateMessage(String sender, String message)
    {
    /*
    Private Message Mod Protection.
    */
    if((sender.substring(4).equalsIgnoreCase("mod ") || sender.equalsIgnoreCase("andrew") || sender.equalsIgnoreCase("paul")) && Running())
    {
    Display("A mod was detected!");
    LogOut();
    End();
    }
    }

    public void OnServerMessage(String message)

    }

  • #2
    Regular Coder mic2100's Avatar
    Join Date
    Feb 2006
    Location
    Scunthorpe
    Posts
    562
    Thanks
    15
    Thanked 28 Times in 27 Posts
    hi,

    on the

    Code:
    public void OnServerMessage(String message)
    
    }
    you havn't placed the opening bracket
    Code:
    public void OnServerMessage(String message){
    
    }
    hope this helps

  • #3
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanx so much


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •