Results 1 to 4 of 4

Thread: uknown identifier

  1. #1
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default uknown identifier

    SCAR Code:
    Procedure Dropping;
    Begin
      Repeat
       MarkTime(Time);
       MultiWait;
        If FindText(x, y, 'ere', NPCCHARS, MCX1, MCY1, MCX2, MCY2) Then <----- howcome it never finds 'ere' ??
          begin
            Mouse(x, y, 1, 1, True);
            Multiwait;
          end
          else writeln('Couldnt find ere');
          Until(Not FindText(x, y, 'ontinue', NPCCHARS, MCX1, MCY1, MCX2, MCY2) Or (LoggedIn = False) Or (TimeFromMark(Time) > (5000)));
      Multiwait;
      Repeat
      For Item := 3 To 28 Do
      DropItem(Item);
      Wait(1);
      Result := True;
      Until (Not(Result)); <----why does it say unknown identifier result?!?!?!?
    End;

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    The result is a variable that is automatically built in when you make a function and this is a procedure so to make that function compile you need to change it to a function like so:

    SCAR Code:
    Function Dropping: Boolean;
    Begin
      Repeat
       MarkTime(Time);
       MultiWait;
        If FindText(x, y, 'ere', NPCCHARS, MCX1, MCY1, MCX2, MCY2) Then
          begin
            Mouse(x, y, 1, 1, True);
            Multiwait;
          end
          else writeln('Couldnt find ere');
          Until(Not FindText(x, y, 'ontinue', NPCCHARS, MCX1, MCY1, MCX2, MCY2) Or (LoggedIn = False) Or (TimeFromMark(Time) > (5000)));
      Multiwait;
      Repeat
      For Item := 3 To 28 Do
      DropItem(Item);
      Wait(1);
      Result := True;
      Until (Not(Result)); <----why does it say unknown identifier result?!?!?!?
    End;

    I'm sure theres a guide on functions and procedures somewhere, but the difference is, a function returns a result, while a procedure doesn't.

  3. #3
    Join Date
    Aug 2008
    Location
    !!LOL!!
    Posts
    247
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah how stupid cud i have been thanks

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Also your second thing, where you say it doesn't find the text, what sort of text are you looking for, there are a few different types, and it might be a different type than you have stated.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Identifier Help
    By Rora in forum OSR Help
    Replies: 2
    Last Post: 12-16-2007, 10:59 PM
  2. help with 3.10 identifier
    By fastler in forum OSR Help
    Replies: 4
    Last Post: 07-17-2007, 12:43 PM
  3. identifier
    By macromacro123 in forum OSR Help
    Replies: 1
    Last Post: 03-06-2007, 04:10 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
  •