Results 1 to 7 of 7

Thread: Type mismatch

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

    Default Type mismatch

    As some of you may know, i have been trying to put failsafes into my script, well this one kinda blew up in my face.
    SCAR Code:
    Procedure WalkToStore;
    Var
    i:integer;
    Begin
    i:=i+1;
    repeat
    If FindColorSpiralTolerance(x,y,Foodstore,583,22,682,138,15)Then
    mouse(x,y,5,5,True);
    until
    i>10 or flag=true//where the error is says "type mismatch"
    if Flag=true then
    wait (x)
    End;

    thanks ya'll!

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sirlaughsalot View Post
    As some of you may know, i have been trying to put failsafes into my script, well this one kinda blew up in my face.
    SCAR Code:
    Procedure WalkToStore;
    Var
    i:integer;
    Begin
    i:=i+1;
    repeat
    If FindColorSpiralTolerance(x,y,Foodstore,583,22,682,138,15)Then
    mouse(x,y,5,5,True);
    until
    i>10 or flag=true//where the error is says "type mismatch"
    if Flag=true then
    wait (x)
    End;

    thanks ya'll!
    "i" will be never 10, becouse it is 1, and you dont change t anymore. Im sure you forgot to put it in the repeat loop.


  3. #3
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    "i" will be never 10, becouse it is 1, and you dont change t anymore. Im sure you forgot to put it in the repeat loop.
    actually i think it has something to do with the "flag=true" part because it has the error and the | is between "flag=|true", even though i have used it before and thats what it had before i put in the failsafe...

  4. #4
    Join Date
    Aug 2007
    Location
    Emo-land
    Posts
    1,109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure WalkToStore;
    Var
      i:integer;
    Begin
      repeat
        i:=i+1;
        If FindColorSpiralTolerance(x,y,Foodstore,583,22,682,138,15) then
          Mouse(x,y,5,5,True);
      until(i > 10) or (Flag)//where the error is says "type mismatch"
      if Flag then
        wait(x);
    end;

    is Flag ment to be FlagPresent? Make sure it is a boolean if you have already declared it.

  5. #5
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by FrÕzÑ_§ÕµL View Post
    SCAR Code:
    Procedure WalkToStore;
    Var
      i:integer;
    Begin
      repeat
        i:=i+1;
        If FindColorSpiralTolerance(x,y,Foodstore,583,22,682,138,15) then
          Mouse(x,y,5,5,True);
      until(i > 10) or (Flag)//where the error is says "type mismatch"
      if Flag then
        wait(x);
    end;

    is Flag ment to be FlagPresent? Make sure it is a boolean if you have already declared it.
    Flag is now boolean. btw, that is what i was saying, sirlaughalot...


  6. #6
    Join Date
    Aug 2007
    Location
    Emo-land
    Posts
    1,109
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so flag has replaced FlagPresent and now works?

    I think it was because your until()() didn't have brackets for each comparism.

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

    Default

    Quote Originally Posted by FrÕzÑ_§ÕµL View Post
    SCAR Code:
    Procedure WalkToStore;
    Var
      i:integer;
    Begin
      repeat
        i:=i+1;
        If FindColorSpiralTolerance(x,y,Foodstore,583,22,682,138,15) then
          Mouse(x,y,5,5,True);
      until(i > 10) or (Flag)//where the error is says "type mismatch"
      if Flag then
        wait(x);
    end;

    is Flag ment to be FlagPresent? Make sure it is a boolean if you have already declared it.
    Thanks that made it work =D thanks cazax as well rep++

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Type Mismatch...
    By Raskolnikov in forum OSR Help
    Replies: 3
    Last Post: 10-18-2008, 05:56 AM
  2. Type mismatch
    By batnas in forum OSR Help
    Replies: 3
    Last Post: 04-24-2008, 06:48 PM
  3. Type Mismatch..
    By Nava2 in forum OSR Help
    Replies: 1
    Last Post: 04-23-2008, 07:44 PM
  4. Type mismatch Help
    By Ashur2Good in forum OSR Help
    Replies: 2
    Last Post: 05-23-2007, 03:47 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
  •