Results 1 to 6 of 6

Thread: What is i be doing wrong?

  1. #1
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default What is i be doing wrong?

    SCAR Code:
    program AutoMiner;
    {.Include Srl/Srl.scar}
    var
    x, y, OresMined, OreColor1, OreColor2, OreColor3 : Integer;
    const
    OreToMine=('copper');
    HowManyOres=(1);
    OreColor4=(0);
    OreColor5=(0);
    OreColor6=(0);
    InvColor=(0);
    Procedure Convert;
    Begin
    If (OreColor5=(0)) and
       (OreColor4=(0)) and
       (InvColor=(0))  and
       (OreColor6=(0)) Then
    Begin
     If (OreToMine=('copper')) Then
    Line 20:  OreColor1=(4483472)
      OreColor2=(5076643)
      OreColor3=(5142693)
      InvColor=(3768282)
    End;
    End;

    Procedure DeclarePlayers;
    Begin
         HowManyPlayers:= 2;
         NumberOfPlayers(2);
         CurrentPlayer := 0;

         Players[0].Name :='';
         Players[0].Pass :='';
         Players[0].Nick :='';
         Players[0].Loc  :='';
         Players[0].Active:=True;

         Players[1].Name :='';
         Players[1].Pass :='';
         Players[1].Nick :='';
         Players[1].Loc  :='';
         Players[1].Active:=True;
    End;
    Procedure AB;
    Begin
     Case Random(8) of
      1, 2:PickUpMouse;
      3, 4:BoredHuman;
    End;

    Procedure Mine;
    Begin
     If (FindColor(x, y, OreColor1, 0, 0, 516, 337)) or
        (FindColor(x, y, OreColor2, 0, 0, 516, 337)) or
        (FindColor(x, y, OreColor3, 0, 0, 516, 337)) then
       Begin
        MMouse(x, y, 5, 5);
         Wait(100+random(250));
         if IsUpText('ine') then
          Begin
           Mouse(x, y, 5, 5, True);
           OresMined:=OresMined + 1;
           AB;
          End;
         End;
     End;
    Begin
    begin
    SetupSrl;
    ActivateClient;
    DeclarePlayers;
    Login;
    Repeat
    Mine;
    Until(OresMined >= HowManyOres) Then
     Logout;
    end.
    What am i doing wrong?
    Line 20: [Error] (16070:10): Assignment expected in script

  2. #2
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    Procedure AB;
    Begin
     Case Random(8) of
      1, 2:PickUpMouse;
      3, 4:BoredHuman;
    End;
    You need another end, one for the procedure and one for the case.

  3. #3
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok but i still get the same error
    Line 20: [Error] (16070:10): Assignment expected in script

  4. #4
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    OreColor1=(4483472)
    Needs to look like this:

    Code:
    OreColor1:=(4483472);

  5. #5
    Join Date
    Sep 2008
    Location
    Earth
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    omg ty!

  6. #6
    Join Date
    Apr 2007
    Location
    Here
    Posts
    109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what am i doing wrong ?:P
    By sjlou in forum OSR Help
    Replies: 2
    Last Post: 10-01-2007, 01:52 PM
  2. What am i doing wrong?
    By One Leeter in forum OSR Help
    Replies: 7
    Last Post: 06-15-2007, 10:33 PM
  3. Replies: 8
    Last Post: 03-23-2007, 04:20 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
  •