Results 1 to 14 of 14

Thread: Hello everyone I need help,Unknown identifier

  1. #1
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Hello everyone I need help,Unknown identifier

    Hello, This is my first post and I'm an uber noob so yeah. Anyway why can I use the "FindObjCustom" or the "IsUpText" with out getting an error? I understand that Unknown Identifier means your code is out dated but, I do see codes that have these functions in them. I'm in the process of making my program A Powerminer.

    I'll post the code even though I don't think it will make a dent.

    Code:
     if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
    Thanks a lot.

  2. #2
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you include srl, and put SetupSrl; in the mainloop?

    ~Sandstorm

  3. #3
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I did include, the include function, but I forgot to put in SetupSrl;.

    Thanks I'll try that.I never knew to do that.

    Where exactly do I put SetupSrl;?

  4. #4
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    At the very start of your main loop.

  5. #5
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.include srl/srl.scar}

    procedure HelloWorld;
    begin
     ClearDebug;
     Writeln('Hello World!');
    end;

    begin
    SetupSRL;
    HelloWorld;
    end.

    that's how you use it ^^

  6. #6
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I still got an error... I'm trying to upload the code...

    Code:
    program New;
            {. Include SRL/SRL.Scar}
    
    
    
            Var
            Say: String;
    
            Rockcolor, x, y: Integer;
    
    
    
    
         procedure Mine;
         begin
    
          Rockcolor:= 1846316 ;//Insert color here
    
         ClearDeBug;
    
         wait(1000);
         if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
          begin
         Writeln('Found Color.');
         MoveMouseSmooth(x, y);
         wait(2000);
         if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
           begin
         Writeln('Found Rock.')
         wait(1000);
         ClickMouse(x, y, True);
           end
         else
         Writeln('That color was not a rock.');
           end
          else
         Writeln('Color of rock not found.');
          end;//procedure
    
    Begin
    SetupSRL;
    Mine;
    end.

  7. #7
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You had this:

    SCAR Code:
    {. Include SRL/SRL.Scar}

    You need this:

    SCAR Code:
    {.Include SRL/SRL.Scar}

    Fixed your standards, changed Clickmouse and Movemousesmooth with the better, undetectable procedures, etc.

    SCAR Code:
    program New;
    {.Include SRL/SRL.Scar}
    Var
      Say: String;
      Rockcolor, x, y: Integer;

    procedure MineOre;
    begin
      Rockcolor:= 1846316 ;//Insert color here
      ClearDeBug;
      wait(1000);
      if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
      begin
        Writeln('Found Color.');
        MMouse(x, y, 3, 3);
        wait(2000);
        if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
         begin
            Writeln('Found Rock.')
            wait(1000);
            Mouse(x, y, 3, 3, True);
         end else
        Writeln('That color was not a rock.');
      end else
      Writeln('Color of rock not found.');
    end;

    Begin
      SetupSrl;
      Mine;
    end.

  8. #8
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program New;
    {.Include SRL/SRL.Scar}

    Var
      Say: String;
      Rockcolor, x, y: Integer;

    const
      Rockcolor:= 1846316 ;//Insert color here
     
    procedure Mine;
    begin
     ClearDebug;
     wait(1000);
      if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
      begin
       Writeln('Found Color.');
       MMouse(x,y,2,2);
       wait(2000);
      if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
      begin
       Writeln('Found Rock.')
       wait(1000);
       MMouse(x, y, 2, 2, true);
      end else
       Writeln('That color was not a rock.');
      end else
      not FindObjCustom(x, y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7) then
       Writeln('Color of rock not found.');
    end;//procedure

    begin
    SetupSRL;
    Mine;
    Until(false);
    end.

    >.> darn you sand.. lol

  9. #9
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 99_ View Post
    SCAR Code:
    program New;
    {.Include SRL/SRL.Scar}

    Var
      Say: String;
      Rockcolor, x, y: Integer;

    const
      Rockcolor:= 1846316 ;//Insert color here
     
    procedure Mine;
    begin
     ClearDebug;
     wait(1000);
      if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
      begin
       Writeln('Found Color.');
       MMouse(x,y,2,2);
       wait(2000);
      if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
      begin
       Writeln('Found Rock.')
       wait(1000);
       MMouse(x, y, 2, 2, true);
      end else
       Writeln('That color was not a rock.');
      end else
      not FindObjCustom(x, y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7) then
       Writeln('Color of rock not found.');
    end;//procedure

    begin
    SetupSRL;
    Mine;
    Until(false);
    end.

    >.> darn you sand.. lol
    Hehe, yours won't compile anyways. Random hanging Until, and there's a colon in your constants. I think you were aiming for this ^.^:

    SCAR Code:
    program New;
    {.Include SRL/SRL.Scar}
    Var
      Say: String;
      Rockcolor, x, y: Integer;
     
    Const
      Rockcolor = 1846316;

    procedure MineOre;
    begin
      Rockcolor:= 1846316 ;//Insert color here
      ClearDeBug;
      wait(1000);
      if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
      begin
        Writeln('Found Color.');
        MMouse(x, y, 3, 3);
        wait(2000);
        if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
         begin
            Writeln('Found Rock.')
            wait(1000);
            Mouse(x, y, 3, 3, True);
         end else
        Writeln('That color was not a rock.');
      end else
      Writeln('Color of rock not found.');
    end;

    Begin
      SetupSrl;
      repeat
        Mine;
      Until(False)
    end.

    ~Sandstorm

  10. #10
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sandstorm View Post
    You had this:

    SCAR Code:
    {. Include SRL/SRL.Scar}

    You need this:

    SCAR Code:
    {.Include SRL/SRL.Scar}

    Fixed your standards, changed Clickmouse and Movemousesmooth with the better, undetectable procedures, etc.

    SCAR Code:
    program New;
    {.Include SRL/SRL.Scar}
    Var
      Say: String;
      Rockcolor, x, y: Integer;

    procedure MineOre;
    begin
      Rockcolor:= 1846316 ;//Insert color here
      ClearDeBug;
      wait(1000);
      if FindColorTolerance(x, y, Rockcolor, 5, 5, 515, 335, 5) then
      begin
        Writeln('Found Color.');
        MMouse(x, y, 3, 3);
        wait(2000);
        if FindObjCustom(x , y, ['ro', 'ck', 'r'], [1989969, 3760987, 2844763], 7)  then
         begin
            Writeln('Found Rock.')
            wait(1000);
            Mouse(x, y, 3, 3, True);
         end else
        Writeln('That color was not a rock.');
      end else
      Writeln('Color of rock not found.');
    end;

    Begin
      SetupSrl;
      Mine;
    end.

    Oh, In the code where I learned that had a space... My bad, But honestly thanks a lot. Im guna test it right now. It compiled fine.

  11. #11
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol sorry.. he had it all set up weird and I didn't notice

  12. #12
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hah, no problem. Not your fault if you didn't notice it. I've done that plenty of times.

    Kasmember13 - No problem. You got MSN? I'm free most nights to help people, and it's easier to talk on MSN .

    ~Sandstorm

  13. #13
    Join Date
    Jan 2009
    Location
    Texas
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It worked!!!!!!! Yeah I do have a MSN name, Kasmember17@aim.com,(I use meebo) Is it alright if I just ask questions every now and then... I just started programing like 3 days ago.

  14. #14
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Of course it's alright! You'll get better if you keep trying, I used to be horrible at scripting to, don't worry about it.

    Added you.

    ~Sandstorm

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unknown Identifier
    By Torrent of Flame in forum OSR Help
    Replies: 2
    Last Post: 02-24-2008, 10:44 AM
  2. Unknown Identifier.
    By iunseeni in forum OSR Help
    Replies: 2
    Last Post: 11-04-2007, 07:36 PM
  3. Unknown Identifier?!
    By ~PuRePoWeR~ in forum OSR Help
    Replies: 1
    Last Post: 05-15-2007, 08:37 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
  •