Results 1 to 11 of 11

Thread: loop ends without any meaning

  1. #1
    Join Date
    Feb 2016
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default loop ends without any meaning

    well the loop

    Repeat
    antiBan();
    slots := slotfind();
    alche(slots);
    Until(Not tabBackPack.isItemInSlot(28));
    writeLn('here');

    well the loop should end when there isnt anything in slot 28 in the inv. but i am 100% there is something and yet the loop ends.
    any ideas how to fix this?

  2. #2
    Join Date
    Sep 2014
    Location
    C:\Simba\
    Posts
    565
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    Does this always happen? or is this only like 1/100 times?
    Feel free to ask me any questions, I will do my best to answer them!

    Previously known as YouPee.

  3. #3
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by bigdick69 View Post
    well the loop

    Repeat
    antiBan();
    slots := slotfind();
    alche(slots);
    Until(Not tabBackPack.isItemInSlot(28));
    writeLn('here');

    well the loop should end when there isnt anything in slot 28 in the inv. but i am 100% there is something and yet the loop ends.
    any ideas how to fix this?
    Do you have the code for alche()?
    You might want to put debug throughout your code so you can see where it stops calling.

  4. #4
    Join Date
    Feb 2016
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    it always happens. yes i have the code for alche

    Procedure alche(sl:integer);
    var
    numb:integer ;
    Begin
    repeat
    typeSend('1', false);
    numb := getItemAmount(tabBackpack.getSlotBox(sl));
    if(numb = -1)then break;
    TBoxArray (tabBackpack.getSlotBoxes());
    writeLn(intToStr(numb));
    tabBackpack.mouseSlot(sl, MOUSE_LEFT);
    //writeLn('variavel pa meterdepois ' +intToStr(numb));
    antiBan();
    wait(2000 + randomRange(-300, 900));
    until(not getItemAmount(tabBackpack.getSlotBox(sl)));
    End;

  5. #5
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by bigdick69 View Post
    it always happens. yes i have the code for alche

    Simba Code:
    Procedure alche(sl:integer);
      var
        numb:integer ;
    Begin
      repeat
        typeSend('1', false);
        numb :=  getItemAmount(tabBackpack.getSlotBox(sl));
        if(numb = -1)then break;
          TBoxArray (tabBackpack.getSlotBoxes());
          writeLn(intToStr(numb));
          tabBackpack.mouseSlot(sl, MOUSE_LEFT);
          //writeLn('variavel pa meterdepois ' +intToStr(numb));
          antiBan();
          wait(2000 + randomRange(-300, 900));
      until(not getItemAmount(tabBackpack.getSlotBox(sl)));
    End;
    Edit: Nevermind took a closer look that's getItemAmount.

    Is SL being declared globally?
    After looking at the original I see slots but not sl - slots <> sl
    Have you verified it's picking up the correct slot?
    Also wrap your code in "["SIMBA][/SIMBA"]" *without the quotations*
    Last edited by Clutch; 03-02-2016 at 07:22 PM.

  6. #6
    Join Date
    Feb 2016
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    the fun flotfind gets the slot then it puts on the alche.
    Simba Code:
    function slotfind(): integer;
                    var
                  slot :integer;
                begin
                slot := 1;
                Repeat
                if( getItemAmount(tabBackpack.getSlotBox(slot)) > 0) then result := slot;
                slot :=slot +1;
                until(slot>=26);
                end;

    in the main loop the slot 28 is the slot i want to pick up that is true because it works and then the alche func bug and it does the break(that is why the numb variable is for) and the getslot is called again and everything is in loop till the slot 28 runs out of items( that is the plan at least) but it is not happening.

    and sl is the var in the argument as you can see in the procedure.

  7. #7
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by bigdick69 View Post
    the fun flotfind gets the slot then it puts on the alche.
    Simba Code:
    function slotfind(): integer;
                    var
                  slot :integer;
                begin
                slot := 1;
                Repeat
                if( getItemAmount(tabBackpack.getSlotBox(slot)) > 0) then result := slot;
                slot :=slot +1;
                until(slot>=26);
                end;

    in the main loop the slot 28 is the slot i want to pick up that is true because it works and then the alche func bug and it does the break(that is why the numb variable is for) and the getslot is called again and everything is in loop till the slot 28 runs out of items( that is the plan at least) but it is not happening.

    and sl is the var in the argument as you can see in the procedure.
    Simba Code:
    if(numb = -1)then break;
    Change this to
    Simba Code:
    if(numb = -1) then writeln('heres our issue');

  8. #8
    Join Date
    Feb 2016
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Clutch View Post
    Simba Code:
    if(numb = -1)then break;
    Change this to
    Simba Code:
    if(numb = -1) then writeln('heres our issue');
    how is this an issue? the break only afects on loop. or not? i am thinking as in c. how do i only end the current loop then? i think the break only kills on loop because i make the main loop infinite Until(2<1);
    and this makes the loop as i say infinite but this is a temp solution and i want the main loop to end when the work is done.

  9. #9
    Join Date
    Mar 2015
    Posts
    438
    Mentioned
    21 Post(s)
    Quoted
    211 Post(s)

    Default

    Quote Originally Posted by bigdick69 View Post
    how is this an issue? the break only afects on loop. or not? i am thinking as in c. how do i only end the current loop then? i think the break only kills on loop because i make the main loop infinite Until(2<1);
    and this makes the loop as i say infinite but this is a temp solution and i want the main loop to end when the work is done.
    Just a test - i'm guessing that's where it's getting stuck at though and continuing to loop and ends up not doing anything.
    Edit: Sorry at work reread - it's breaking out of the mainloop. That means it's picking up the tabbackpack. I'll be off in like 3 or so hours and can TV if you'd like.
    Last edited by Clutch; 03-02-2016 at 09:41 PM.

  10. #10
    Join Date
    Feb 2015
    Posts
    422
    Mentioned
    41 Post(s)
    Quoted
    226 Post(s)

    Default

    Can you please post the whole script here so we can take a look at everything. I see you have writeLn('here') at the end, right after the loop. Does the debug type the here? Or does it terminate without the here?

    Make sure to put simba tags around the script when posting

  11. #11
    Join Date
    Oct 2014
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by bigdick69 View Post
    well the loop

    Repeat
    antiBan();
    slots := slotfind();
    alche(slots);
    Until(Not tabBackPack.isItemInSlot(28));
    writeLn('here');

    well the loop should end when there isnt anything in slot 28 in the inv. but i am 100% there is something and yet the loop ends.
    any ideas how to fix this?
    It would also be nice to know what value tabBackPack.isItemInSlot(28) is returning or if the program even makes it this far before ending the thread. If the thread ends prior to this then debug the script and find out where it is terminating, otherwise the whole script needs to be posted so others can debug it and tell you what's wrong.

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
  •