Results 1 to 11 of 11

Thread: Identifier expected? I need help with this

  1. #1
    Join Date
    Mar 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Identifier expected? I need help with this

    Ok, So I wrote a basic Script and It should work, but..... It dosent Please help, heres the script
    --------------------------------------------------------------------------
    program ScottysPowerminer;

    Var
    i,x,y: Integer;

    Const
    RockColor1= 8421770;//Set the color of the Rock
    RockCOlor2= 8421770;//Set another color of the Rock
    Orecolor= 3559008;//The Color of ore you are dropping


    Procedure Introduction;
    begin
    ClearDebug;
    Writeln('Hi, welcome to ScottysPowerminer!');
    Wait(1000);
    Writeln('Please let me know if there are any bugs, and enjoy your autoing!');
    end;

    Procedure Mine;
    begin
    i:= 0;
    repeat
    i:= i + 1;
    If(FindColor(x,y,Rockcolor1,0,0,517,337)) and
    (FIndColor(x,y,RockColor2,0,0,517,337)) then
    begin
    Writeln('Now Mining')
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    ClickMouse(x,y,true);
    Wait(10000+random(500));
    MoveMouseSmoothEx(620,229 +random(0),20,40,45,25,20);
    wait(500+random(50));
    ClickMouse(620,229,false);
    Wait(500+random(50));
    MoveMouseSmoothEx(616,265 +random(0),20,40,45,25,20);
    Wait(500+random(50));
    ClickMouse(616,265,true);
    until(false);
    end;

    begin
    Introduction;
    Mine;
    End.
    --------------------------------------------------------------------------
    Can someone tell me what I did wrong?

  2. #2
    Join Date
    Jul 2007
    Location
    Missouri
    Posts
    318
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow. you are using lots of functions that you should not, but the problem is that you need another end; in your mine procedure.

    look at some more tuts, don't use MoveMouseSmooth and such, use MMouse

  3. #3
    Join Date
    Mar 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Illkillutill View Post
    wow. you are using lots of functions that you should not, but the problem is that you need another end; in your mine procedure.

    look at some more tuts, don't use MoveMouseSmooth and such, use MMouse

    I put another end in my script like this Ill put it in bold so its easier to see. It still wont work it says i still need an identifier
    --------------------------------------------------------------------------
    program ScottysPowerminer;

    Var
    i,x,y: Integer;

    Const
    RockColor1= 8421770;//Set the color of the Rock
    RockCOlor2= 8421770;//Set another color of the Rock
    Orecolor= 3559008;//The Color of ore you are dropping


    Procedure Introduction;
    begin
    ClearDebug;
    Writeln('Hi, welcome to ScottysPowerminer!');
    Wait(1000);
    Writeln('Please let me know if there are any bugs, and enjoy your autoing!');
    end;

    Procedure Mine;
    begin
    i:= 0;
    repeat
    i:= i + 1;
    If(FindColor(x,y,Rockcolor1,0,0,517,337)) and
    (FIndColor(x,y,RockColor2,0,0,517,337)) then
    begin
    Writeln('Now Mining')
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    ClickMouse(x,y,true);
    Wait(10000+random(500));
    MoveMouseSmoothEx(620,229 +random(0),20,40,45,25,20);
    wait(500+random(50));
    ClickMouse(620,229,false);
    Wait(500+random(50));
    MoveMouseSmoothEx(616,265 +random(0),20,40,45,25,20);
    Wait(500+random(50));
    ClickMouse(616,265,true);
    until(false);
    end;
    end;

    begin
    Introduction;
    Mine;
    End.

  4. #4
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    put the end in your mine; procedure before the until.

  5. #5
    Join Date
    Jul 2007
    Posts
    217
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, instead of click mouse use just Mouse. Your problem is puzzling, to me anyway, I will keep looking though. Maybe someone better will find it first. You shouldn't use until(false) though, you should have a variable that starts at 0 and everytime it repeats it adds one then for until you put

    until( i >= Loads)

    I said this because it said no unlimited loops in the rules of autoing, and I believe that makes one.

  6. #6
    Join Date
    Mar 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by isjusme View Post
    Yeah, instead of click mouse use just Mouse. Your problem is puzzling, to me anyway, I will keep looking though. Maybe someone better will find it first. You shouldn't use until(false) though, you should have a variable that starts at 0 and everytime it repeats it adds one then for until you put

    until( i >= Loads)
    What do you mean, do you have an example you could show me?

  7. #7
    Join Date
    Mar 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by skilld u View Post
    put the end in your mine; procedure before the until.
    ZOMG! THANK YOU SO MUCH!!!!!!

  8. #8
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no problem.

  9. #9
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    lol here you go
    SCAR Code:
    program ScottysPowerminer;

    Var
    i,x,y: Integer;

    Const
    RockColor1= 8421770;//Set the color of the Rock
    RockCOlor2= 8421770;//Set another color of the Rock
    Orecolor= 3559008;//The Color of ore you are dropping


    Procedure Introduction;
    begin
    ClearDebug;
    Writeln('Hi, welcome to ScottysPowerminer!');
    Wait(1000);
    Writeln('Please let me know if there are any bugs, and enjoy your autoing!');
    end;

    Procedure Mine;
    begin
    i:= 0;
    repeat
    i:= i + 1;
    If(FindColor(x,y,Rockcolor1,0,0,517,337)) and
    (FIndColor(x,y,RockColor2,0,0,517,337)) then
    begin
    Writeln('Now Mining')
    MoveMouseSmoothEx(x,y +random(0),20,40,45,25,20);
    ClickMouse(x,y,true);
    Wait(10000+random(500));
    MoveMouseSmoothEx(620,229 +random(0),20,40,45,25,20);
    wait(500+random(50));
    ClickMouse(620,229,false);
    Wait(500+random(50));
    MoveMouseSmoothEx(616,265 +random(0),20,40,45,25,20);
    Wait(500+random(50));
    ClickMouse(616,265,true);
    end;
    until(false);
    end;

    begin
    Introduction;
    Mine;
    End.

    EDIT: awww Skilled U got there just before me

    ~shut

  10. #10
    Join Date
    Jul 2007
    Posts
    217
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its kind of hard to make an example for me, so here is a tutorial that has it in there
    http://www.villavu.com/forum/showthread.php?t=4625

    Go to the Loops/Until portion

  11. #11
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Well maybe make a mod loop so is your loads divided by how many you want to do is equal to 0 then it will exit;
    It's much quicker and very more reliable.

    Hope I Helped

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Identifier Expected
    By Torrent of Flame in forum OSR Help
    Replies: 9
    Last Post: 02-23-2008, 01:21 PM
  2. Identifier expected
    By badandymitch in forum OSR Help
    Replies: 4
    Last Post: 05-31-2007, 11:57 PM
  3. Identifier Expected
    By PwNZoRNooB in forum OSR Help
    Replies: 5
    Last Post: 05-03-2007, 07:05 PM

Posting Permissions

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