What is wrong with this?

Discussion in 'Scar/Simba Help' started by No Im Not Ogre2, Mar 13, 2009.

What is wrong with this?
  1. Unread #1 - Mar 13, 2009 at 1:00 AM
  2. No Im Not Ogre2
    Joined:
    Mar 13, 2009
    Posts:
    1
    Referrals:
    0
    Sythe Gold:
    0

    No Im Not Ogre2 Newcomer

    What is wrong with this?

    I'm getting this error :
    [Error] (16834:1): Type mismatch in script C:\Users\Dillon\Desktop\Good Scripts\Miners\Wizzup SMART Essence Miner - Edited.scar

    that error is for the line "rToMsg[1] := '/Sup';

    Code:
    procedure FirstMessage;
    var
    GeneralRankBMP : String;
    i : Integer;
    rToMsg0 : array [1..4] of String;
    
    begin
      GeneralRankBMP := BitmapFromString(12, 15, 'beNrTVjTWkAciU21FI' +
           'DLDgSBqIMoIqgEiNEFkrimMARLRUvx9JRBNDcQlcMEHW9SBaoAksu' +
           'HI5M4p6t/POgHVABGQjawGiIAaQSZc9gLK/v+fAmLAENw9QF3vDpk' +
           'ARYAKIAjIfr5b73VTHMKpYGUfjhj9vOAMUfBqnxFQAbJLIAygMqAa' +
           'kJMue30/a2eKJAvxHcS675dCP24KACoAIqCIKWoAAhV8Pu0B1wK0C' +
           '6gMLTyRjcWMC1xRgKkGa5SBRADzfKHi')
           
      rToMsg0[1] := '/Sup';
      rToMsg0[2] := '/Hey';
      rToMsg0[3] := '/Hello';
      rToMsg0[4] := '/Supp';
    
      GameTab(10);
        if(FindBitmap(GeneralRankBMP, x, y)) then
        begin
          i := Random(5);
          TypeSend(rToMsg0[i]);
        end;
    end;
     
  3. Unread #2 - Mar 13, 2009 at 1:23 PM
  4. HyperSecret
    Joined:
    Jun 5, 2007
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0

    HyperSecret Active Member

    What is wrong with this?

    I haven't scripted Scar forever but doesn't the Bitmap statement need to be closed with a semi-colon at the end?

    Code:
    procedure FirstMessage;
    var
    GeneralRankBMP : String;
    i : Integer;
    rToMsg0 : array [1..4] of String;
    
    begin
      GeneralRankBMP := BitmapFromString(12, 15, 'beNrTVjTWkAciU21FI' +
           'DLDgSBqIMoIqgEiNEFkrimMARLRUvx9JRBNDcQlcMEHW9SBaoAksu' +
           'HI5M4p6t/POgHVABGQjawGiIAaQSZc9gLK/v+fAmLAENw9QF3vDpk' +
           'ARYAKIAjIfr5b73VTHMKpYGUfjhj9vOAMUfBqnxFQAbJLIAygMqAa' +
           'kJMue30/a2eKJAvxHcS675dCP24KACoAIqCIKWoAAhV8Pu0B1wK0C' +
           '6gMLTyRjcWMC1xRgKkGa5SBRADzfKHi');
           
      rToMsg0[1] := '/Sup';
      rToMsg0[2] := '/Hey';
      rToMsg0[3] := '/Hello';
      rToMsg0[4] := '/Supp';
    
      GameTab(10);
        if(FindBitmap(GeneralRankBMP, x, y)) then
        begin
          i := Random(5);
          TypeSend(rToMsg0[i]);
        end;
    end;
    
    Besides that I believe it should work. I am doing c++ right now so everything isn't fresh in my mind for Scar.
     
  5. Unread #3 - Mar 13, 2009 at 6:50 PM
  6. cazax
    Joined:
    Nov 13, 2007
    Posts:
    457
    Referrals:
    0
    Sythe Gold:
    0

    cazax Forum Addict

    What is wrong with this?

    GeneralRankBMP has to be declared as Integer, not as string.
     
< Need help fixing script give ne error on pasword part | Please help i cant run scripts >

Users viewing this thread
1 guest


 
 
Adblock breaks this site