Results 1 to 4 of 4

Thread: FindColorSpiral : type mismatch

  1. #1
    Join Date
    Apr 2012
    Location
    Brampton
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindColorSpiral : type mismatch

    I need some help .. I just started scripting yesterday and have been working on a script almost nonstop and now it has an error.

    I am trying to use FindColorSpiralTolerance to look for bones but when I compile I get the error "type mismatch". The error is in the first line below.


    Also, when is it useful to use the "Exit;" command and what does it do?


    Code:
    if not(FindColorSpiralTolerance(x, y, 14738919, MSX1, MSY1, MSX2, MSY2, 5))then
    
        begin
    
          writeln('No Bones Were Found');
          Exit;
    
        end;
    
    else
    
        // pick up bones

  2. #2
    Join Date
    Dec 2011
    Location
    Toronto, Ontario
    Posts
    6,424
    Mentioned
    84 Post(s)
    Quoted
    863 Post(s)

    Default

    Simba Code:
    if not(FindColorSpiralTolerance(x, y, 14738919, MSX1, MSY1, MSX2, MSY2, 5))then

        begin

          writeln('No Bones Were Found');
          Exit;

        end else

        // pick up bones

  3. #3
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    If it says type mismatch it probably means you declared a variable incorrectly(like declaring x as string or something). The Exit command exits the procedure that it is in.

  4. #4
    Join Date
    Apr 2012
    Location
    Brampton
    Posts
    29
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh crap, I had the x, y coordinates as extended..

    thanks for the fix sin, I would never have found that syntax error on my own.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •