Results 1 to 11 of 11

Thread: Boolean Problem

  1. #1
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Boolean Problem

    I'm using JAD's JADSymbol function:
    SCAR Code:
    function JadSymbol(WhatSymbol: String; Click, Switch: Boolean): Boolean;

    like this:

    SCAR Code:
    begin
      if (not(JADSymbol('water',true,false))) then
      begin
        RadialRoadWalk(FindVarrockRoadColor, 85, 110, 40, 0, 0);
        Flag;
      end;
    end;

    except it Radialwalks even if JADSymbol is True. I'm not sure how to get it so that it will only RadialWalk when JADSymbol isn't found.

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Try commenting all that out and just do "writeln(booltostr(JADSymbol('water',true,false))) ;"
    If it writes true, then there's something wrong...

  3. #3
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    begin
      if (JADSymbol('water',true,false)) then
      begin
      end
    else
    begin
    RadialRoadWalk(FindVarrockRoadColor, 85, 110, 40, 0, 0);
        Flag;
    end;
    end;

    Wouldn't that work?

    It is the same principle as your's though.

    Try what bullzeye said and check there isn't something wrong with JADSymbol

  4. #4
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Well that would be the same thing as he's doing now, just in a longer form.

  5. #5
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol. As I said...

  6. #6
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    No fair, you edited

    (stupid 60 second rule)

  7. #7
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    lol =D

    At least it stops spam bots.

  8. #8
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hmm didn't know you could writeln to get the result. Ok well thanks guys I'll let you know if it still doesnt work

  9. #9
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ok weird... I get "Please enter a valid symbol name!" for Writeln(Booltostr(JadSymbol('water',true,false))); , but not for the same thing with FindSymbol.

    EDIT ok so after waiting for the for i:= 1 to 25 do Findsymbol etc etc in Jadsymbol it told me that the symbol was not found and that the result was false. So do you think that because initially it thinks you've entered an invalid symbol that it returns false or something? Because after a little while it then searches for the symbol successfully.

    here's the whole Jadsymbol:
    SCAR Code:
    function JadSymbol(WhatSymbol: String; Click, Switch: Boolean): Boolean;// By JAD, Thank you too!
    var I: Integer;
    begin
      for I := 1 to 25 do
      begin
        if(FindSymbol(x,y,(WhatSymbol)))then
        begin
          if(Click)then
            Mouse(x,y,2,2,true);
            Flag;//little extra
          Result := True;
          Exit;
        end;
        wait(750+random(500));
      end;
      Writeln('Could NOT find symbol.');
      Result := False;
      if(Switch)then
        LogOut;
    end;

    Help Please!

  10. #10
    Join Date
    Oct 2006
    Posts
    1,071
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ok well Sp0rk-eh's solution worked! Lol, kinda ugly, but it works

  11. #11
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha, I am the don.

    I don't care if its ugly

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
  •