Results 1 to 3 of 3

Thread: FindText and Error?

  1. #1
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default FindText and Error?

    Ok, All i need is for someone to walk me through FindTextAt or any of those finding text things. I need to make something to make sure the general store screen is up. Also, How do i figure out where this error is coming from?
    PHP Code:
    [Error] (20151:1): Identifier expected 
    Im editing a multiplayer into Neilsies Tut Runner and i modified loginplayer and next player to look like this

    SCAR Code:
    Procedure Logitin;
    var
      ClickHereToPlay, CHx, CHy: Integer;
    begin
    ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
        'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
        '26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
        '067D37AC3D95AADF2F50962C79');
    ClickOption('Cancel', 1);
    ClickOption('Exist', 1);
    TypeSend(Players[CurrentPlayer].Name);
    TypeSend(Players[CurrentPlayer].Pass);
    ClickOption('Login', 1);
    repeat
    wait(1000)
    until (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390,5))
    or FindColor(CHx, CHy,723587, 555, 10, 575, 30);
    Wait(1000 + Random(500));
    if (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5))
    then
    Mouse(CHx, CHy, 50, 20, True)
    repeat
    wait(1000)
    until(Loggedin)
    end;

    Procedure NextGuy(Active : Boolean);
    begin
      if RandomPlayer then
        RandomNextPlayer(Active)
      else
      begin
        WriteLn('NextPlayer');
        if not Active then
          Players[CurrentPlayer].Active := False;
        Logout;
        PlayerCurTime := (GetSystemTime div 1000);
        Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
          ((PlayerCurTime - PlayerStartTime) / 60);
        CurrentPlayer := CurrentPlayer + 1;
        if CurrentPlayer > HowManyPlayers - 1 then
          CurrentPlayer := 0;
        while Players[CurrentPlayer].Active = False do
        begin
          CurrentPlayer := CurrentPlayer + 1;
          if CurrentPlayer > HowManyPlayers - 1 then
          begin
            CurrentPlayer := 0;
            Wait(10000); // Everybody False. Endless Loop.
          end;
        end;
        if Players[CurrentPlayer].Active = True then
        begin
          Logs := Logs + 1;
        end;
        Logitin;
      end;
    end;

    And dont mention standards I know its flat, but since its only me reading it, i figured i could cheat . I figure i can post this without noobs working it cause they wouldnt know how to implement it to work. I dont want to look all through these 80+ lines, im just too, tired for it. Please debug this, although it isnt nessasary (sp?) I just mainly want the FindText thing.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  2. #2
    Join Date
    Aug 2006
    Location
    London
    Posts
    2,021
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    a common reason could be that you've missed SetupSRL;

    'identifyer expected', means you've missed the ending of something, like a 'begin' without an 'end' or a 'repeat' without 'until'
    Join the Official SRL IRC channel. Learn how to Here.

  3. #3
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I know, but it doesnt seem to have one missing does it? I copied it almost exactly from the SRL Command but edited it a bit... It does have SetupSRL... And why doesnt it say what line it is missing?

    EDIT: I seemed to have fixed it...
    SCAR Code:
    if (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5))
    then

    Should have been

    SCAR Code:
    if (FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5))then

    I guess? It compiles now?

    Could someone just walk me through FindTextAt or whatever now?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Function FindText??
    By King of the Nites in forum OSR Help
    Replies: 6
    Last Post: 05-25-2008, 11:57 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
  •