Results 1 to 4 of 4

Thread: Got an error with something SCAR gave me?

  1. #1
    Join Date
    Aug 2006
    Location
    Belgium
    Posts
    149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Got an error with something SCAR gave me?

    Hello all

    I started (again) with SCAR, and I wanted to make an auto for a flash game (for learning proposes).

    So, when you 'die' in the game, you can click on try again. So I wanted to import a bitmap (this is my first time i worked with bitmaps), so I went to 'Script -> Picture To String...'.

    I clicked on 'Open', chose the Bitmap, and in the box, I got this:
    SCAR Code:
    Play_again := BitmapFromString(26, 13, 'z78DAA594618EDC200C' +
           '85AF4400DBF01330B9FF91FA6CD0964CBAED4ACD486F224CCCE70' +
           '7A61656D69AB871BB8F67A41E7A28996EBA4BA041432675EA32A8' +
           '52954E858A4E25A5357FBD631CD1AA25957466AB77C9F85D98A22' +
           '56E9D344B3A74ADB5DE3D0AAAC2A54CCE9C1F6CA16953F018C930' +
           '12298447843265614A945435EBFE6ABDAFF15A65CA7CB0F5124AD' +
           '879F4A1967FBED4A3E566622A8D23C7335B9FADB72E0D41DE3C64' +
           'EB4AA28B2E89142868D7A4DB9FF5BEC62BCB90F1602B46BBF3AC1' +
           'A97AEFC6FF568E97CF155C43C3CB3CD7BB6D9961B5B87ADBE1836' +
           '15DFF9CE5F6C51234F9B589354A90F36A795EC752D258A14E1F3A' +
           '956FB7AF768A9BEBF6467E9FE8F0707E0D28B35F7DC6B149C8007' +
           '5B9686DF95679E12B7A22C49DFA8470B1B154E29F6F7B1969A33B' +
           'DA245B81757D8DDA873CB2D77329D3ACB2C0FB66647BE0661E107' +
           '5B143C7015E430FB4BBFAB74AD05C770F6C0865D7E44BB158A2AB' +
           '047A877E4B1734E40351EB9E6BA781E6C7DB391D083ED325AB88A' +
           'AF7606D77FB0453F7BD3F6FA116DE615D84005B655E9CA6C3AB26' +
           '4F9600B1AC08671B0E1EFC1E623EBAB53C18C2AE0EA87CF60033A' +
           '1CB3DE513B7B7F640315761F532538D56DCEC08137DBF20D97115' +
           '6FC606B5AAD3D7CFC8FFAE1334E4E6A09F7AA75875AEF7CEC295C' +
           '45D31B5B72B6686CF070111A5B3FD8FAEE05B0A1D7900D6E60D2A' +
           '2FA49378D8A4BABA1C7B12A1CB30E0DDEB3F3C536DC37F63D6527' +
           'CC4E989CD039DF6CF01640A7AEB57EC2868E8357A81DFBB21484C' +
           '676FB9DA37673CAF02E6EDEE9D57B61693938E9A03D99FFAEF11B' +
           '3DE71C39D10B76CB05679BCEA6CE369CADBB36676B9BD308C5D99' +
           '6F256CBF9567A69DE0CBFF58C1EDFFE021B35DC8F');

    So I made a procedure like this:
    SCAR Code:
    procedure FindPlayAgainButton;
    Begin
      Play_again := BitmapFromString(26, 13, 'z78DAA594618EDC200C' +
           '85AF4400DBF01330B9FF91FA6CD0964CBAED4ACD486F224CCCE70' +
           '7A61656D69AB871BB8F67A41E7A28996EBA4BA041432675EA32A8' +
           '52954E858A4E25A5357FBD631CD1AA25957466AB77C9F85D98A22' +
           '56E9D344B3A74ADB5DE3D0AAAC2A54CCE9C1F6CA16953F018C930' +
           '12298447843265614A945435EBFE6ABDAFF15A65CA7CB0F5124AD' +
           '879F4A1967FBED4A3E566622A8D23C7335B9FADB72E0D41DE3C64' +
           'EB4AA28B2E89142868D7A4DB9FF5BEC62BCB90F1602B46BBF3AC1' +
           'A97AEFC6FF568E97CF155C43C3CB3CD7BB6D9961B5B87ADBE1836' +
           '15DFF9CE5F6C51234F9B589354A90F36A795EC752D258A14E1F3A' +
           '956FB7AF768A9BEBF6467E9FE8F0707E0D28B35F7DC6B149C8007' +
           '5B9686DF95679E12B7A22C49DFA8470B1B154E29F6F7B1969A33B' +
           'DA245B81757D8DDA873CB2D77329D3ACB2C0FB66647BE0661E107' +
           '5B143C7015E430FB4BBFAB74AD05C770F6C0865D7E44BB158A2AB' +
           '047A877E4B1734E40351EB9E6BA781E6C7DB391D083ED325AB88A' +
           'AF7606D77FB0453F7BD3F6FA116DE615D84005B655E9CA6C3AB26' +
           '4F9600B1AC08671B0E1EFC1E623EBAB53C18C2AE0EA87CF60033A' +
           '1CB3DE513B7B7F640315761F532538D56DCEC08137DBF20D97115' +
           '6FC606B5AAD3D7CFC8FFAE1334E4E6A09F7AA75875AEF7CEC295C' +
           '45D31B5B72B6686CF070111A5B3FD8FAEE05B0A1D7900D6E60D2A' +
           '2FA49378D8A4BABA1C7B12A1CB30E0DDEB3F3C536DC37F63D6527' +
           'CC4E989CD039DF6CF01640A7AEB57EC2868E8357A81DFBB21484C' +
           '676FB9DA37673CAF02E6EDEE9D57B61693938E9A03D99FFAEF11B' +
           '3DE71C39D10B76CB05679BCEA6CE369CADBB36676B9BD308C5D99' +
           '6F256CBF9567A69DE0CBFF58C1EDFFE021B35DC8F');

      if(FindBitmap(Play_again, PA1, PA2))
      begin
        MoveMouseSmooth(PA1, PA2);
        wait(200);
        ClickMouse(PA1, PA2);
      end;
           

    end;

    Now, when i press compile, I get this error:
    Code:
    Line 31: [Error] (31:45): Type mismatch in script
    Which points to the last line of the BitmapFromString

    Can anyone help me?
    Thanks
    Drunkenoldma

  2. #2
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    PHP Code:
    program New;
    Var 
    PA1PA2,Play_again :integer;




    procedure FindPlayAgainButton;
    Begin
      Play_again 
    := BitmapFromString(2613'z78DAA594618EDC200C' +
           
    '85AF4400DBF01330B9FF91FA6CD0964CBAED4ACD486F224CCCE70' +
           
    '7A61656D69AB871BB8F67A41E7A28996EBA4BA041432675EA32A8' +
           
    '52954E858A4E25A5357FBD631CD1AA25957466AB77C9F85D98A22' +
           
    '56E9D344B3A74ADB5DE3D0AAAC2A54CCE9C1F6CA16953F018C930' +
           
    '12298447843265614A945435EBFE6ABDAFF15A65CA7CB0F5124AD' +
           
    '879F4A1967FBED4A3E566622A8D23C7335B9FADB72E0D41DE3C64' +
           
    'EB4AA28B2E89142868D7A4DB9FF5BEC62BCB90F1602B46BBF3AC1' +
           
    'A97AEFC6FF568E97CF155C43C3CB3CD7BB6D9961B5B87ADBE1836' +
           
    '15DFF9CE5F6C51234F9B589354A90F36A795EC752D258A14E1F3A' +
           
    '956FB7AF768A9BEBF6467E9FE8F0707E0D28B35F7DC6B149C8007' +
           
    '5B9686DF95679E12B7A22C49DFA8470B1B154E29F6F7B1969A33B' +
           
    'DA245B81757D8DDA873CB2D77329D3ACB2C0FB66647BE0661E107' +
           
    '5B143C7015E430FB4BBFAB74AD05C770F6C0865D7E44BB158A2AB' +
           
    '047A877E4B1734E40351EB9E6BA781E6C7DB391D083ED325AB88A' +
           
    'AF7606D77FB0453F7BD3F6FA116DE615D84005B655E9CA6C3AB26' +
           
    '4F9600B1AC08671B0E1EFC1E623EBAB53C18C2AE0EA87CF60033A' +
           
    '1CB3DE513B7B7F640315761F532538D56DCEC08137DBF20D97115' +
           
    '6FC606B5AAD3D7CFC8FFAE1334E4E6A09F7AA75875AEF7CEC295C' +
           
    '45D31B5B72B6686CF070111A5B3FD8FAEE05B0A1D7900D6E60D2A' +
           
    '2FA49378D8A4BABA1C7B12A1CB30E0DDEB3F3C536DC37F63D6527' +
           
    'CC4E989CD039DF6CF01640A7AEB57EC2868E8357A81DFBB21484C' +
           
    '676FB9DA37673CAF02E6EDEE9D57B61693938E9A03D99FFAEF11B' +
           
    '3DE71C39D10B76CB05679BCEA6CE369CADBB36676B9BD308C5D99' +
           
    '6F256CBF9567A69DE0CBFF58C1EDFFE021B35DC8F');

      if(
    FindBitmap(Play_againPA1PA2)) Then
      begin
        MoveMouseSmooth
    (PA1PA2);
        
    wait(200);
        
    ClickMouse(PA1PA2,True);
      
    end;


    end;

    begin
    FindPlayAgainButton
    ;
    end

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

    Default

    basicly what Home is saying is that you didnt declare the variable for the bitmap, you need to declare an integer variable to hold the handle number of the bitmap
    Join the Official SRL IRC channel. Learn how to Here.

  4. #4
    Join Date
    Aug 2006
    Location
    Belgium
    Posts
    149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, I'm so stupid, I did declare it, but i declared it as a string

    Anyway, thanks, you can close this

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Jagex Gave Me 100 Black Marks! *OLD*
    By Zodia in forum Banned from RS
    Replies: 32
    Last Post: 09-04-2009, 08:36 AM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 AM
  4. LordGregGreg gave himself noob points?
    By fom in forum News and General
    Replies: 7
    Last Post: 01-13-2008, 03:09 AM

Posting Permissions

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