Results 1 to 5 of 5

Thread: Help me solve this error in my first script!

  1. #1
    Join Date
    May 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Red face Help me solve this error in my first script!

    Getting this error in my code:
    Error: Exception: Type Mismatch at line 31

    please help

    Simba Code:
    program new;
    {$DEFINE SMART8}
    {$i srl-OSR/srl.simba}

    Const
          NAME  = '';
          PASS  = '';
          NICK  = '';

          OreC1 = '2898271';
          OreC2 = '1910851';
          OreC3 = '2240075';

    Procedure DeclarePlayers;

      Begin
            HowManyPlayers := 1;
            NumberOfPlayers(HowManyPlayers);

            Players[0].Name    := NAME;
            Players[0].Pass    := PASS;
            Players[0].Nick    := Nick;
            Players[0].Active  := True;
      end;

    function MineOre:Boolean;
        Var x, y, PlusOne: integer;
          Begin
                PlusOne := InvCount+1;
                FindNormalRandoms;
                If (FindObjCustom(x, y, ['ine', 'ock'], [OreC1, OreC2, OreC3], 5)) Then
                  ClickMouse2(mouse_right);
                  WaitOptionEx('Mine', 'action', ClickLeft, 150);
                repeat
                  wait(400+random(250));
                until (InvCount=PlusOne);
          end;
    begin
    DeclarePlayers;
    SetupSRL;
    ActivateClient;
    LoginPlayer;
    Repeat

      MineOre;
      if InvFull Then
      DropAll;

    Until(false);

    end.

  2. #2
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Hey man. Which line is 31? Using my phone, it isn't very easy to see. Cheers!
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  3. #3
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    because you had quotes around the numbers, they get read as strings, but they need to be integers. Remove the quotes like below.
    [samba]
    OreC1 = 2898271;
    OreC2 = 1910851;
    OreC3 = 2240075;
    [/samba]

  4. #4
    Join Date
    May 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    Hey man. Which line is 31? Using my phone, it isn't very easy to see. Cheers!
    If (FindObjCustom(x, y, ['ine', 'ock'], [OreC1, OreC2, OreC3], 5)) Then

    that one )

  5. #5
    Join Date
    May 2012
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by tealc View Post
    because you had quotes around the numbers, they get read as strings, but they need to be integers. Remove the quotes like below.
    [samba]
    OreC1 = 2898271;
    OreC2 = 1910851;
    OreC3 = 2240075;
    [/samba]
    ty man! this fixed it. MY script works like a charm now only have to add antiban and failsafes

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
  •