Results 1 to 3 of 3

Thread: Help with this variable? Is it supposed to be declared differently?

  1. #1
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default Help with this variable? Is it supposed to be declared differently?

    Simba Code:
    var
      count: integer;
      slot: TBox;
    begin
          Count := bankscreen.getPackCount();
          Slot := bankscreen.getPackSlotBox(Count + 1);
     
         repeat
            Wait((700+Random(500)));
              if not bankScreen.isButtonActive(BANK_BUTTON_NOTE)then
                begin
                  //typeSend('n'); // Keybind for noting items
                  bankScreen.clickButton(BANK_BUTTON_NOTE);
                end;
              bankScreen.searchBank('raw');
                wait(1000+random(500));
              mouse(94,109,3,3,mouse_move); // First slot where searched item should be
              Wait((3000+Random(500)));
                if isMouseOverText(['aw']) then
                  begin
                    repeat
                      fastClick(mouse_right);
                        wait(1000+random(500));
                        chooseOption.select(['ithdraw-All']);
                        wait(2000+random(500));
                    until not isMouseOverText(['aw']);
                  end;
                wait((3000+random(2000)));
                mousebox(Slot, mouse_move);
                wait((3000+random(2000)));
          until (bankScreen.isItemInPackSlot(Slot)) and isMouseOverText(['aw']) and not bankScreen.isItemInPackSlot(10);
                     ^//THIS is line 1146 highlighting (bankScreen.isItemInPackSlot(Slot))
    end;
    Progress Report:
    Error: Expected variable of type "Int32", got "record [0]Int32; [4]Int32; [8]Int32; [12]Int32; end" at line 1146, column 41 at line 1146
    You have permission to steal anything I've ever made...

  2. #2
    Join Date
    Mar 2013
    Posts
    1,010
    Mentioned
    35 Post(s)
    Quoted
    620 Post(s)

    Default

    In your script the "slot" of the item (0-27) is count+1 and bankScreen.isItemInPackSlot wants the integer(number) slot not the variable slot you have defined (a TBox) so "bankScreen.isItemInPackSlot(Slot)" should be "bankScreen.isItemInPackSlot(Count+1)"
    #slack4admin2016
    <slacky> I will build a wall
    <slacky> I will ban reflection and OGL hooking until we know what the hell is going on

  3. #3
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Quote Originally Posted by Harrier View Post
    In your script the "slot" of the item (0-27) is count+1 and bankScreen.isItemInPackSlot wants the integer(number) slot not the variable slot you have defined (a TBox) so "bankScreen.isItemInPackSlot(Slot)" should be "bankScreen.isItemInPackSlot(Count+1)"
    Thank you that is exactly what I needed.
    You have permission to steal anything I've ever made...

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
  •