Results 1 to 8 of 8

Thread: eh i dont get it...

  1. #1
    Join Date
    Jan 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default eh i dont get it...

    k so i got this error when trying to run a basic command. please note i am VERY new to scripting and that this is my FIRST experience with programming.

    Successfully compiled
    [Runtime Error] : Math error in line 223 in script C:\Program Files\SCAR 3.11\includes\srl\srl\core\MouseFlag.scar
    is the error i got when trying to run this.

    Code:
    program ChickenF***er;  // Caleb
    {.include SRL/SRL.scar}
    
    procedure ChickAtk;
    begin
    if(FindColor(x,y,3693687,0,0,700,700))then;
    MMouse(x,y,0,0);
    end;
    
    begin
    ChickAtk;
    end.

    and then it popped up a new tab named "MouseFlag.scar" and said that error.

  2. #2
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    -First off, do you have SCAR Divi and the newest SRL?
    -Did you copy the plugins from 'Copy this to plugins' (sumthin like that XD) into the plugins folder? (You have to say yes to replace all)
    -Did you install SRL (read the 'How to install' forum)

    If you did all these things post and I'll think of a new way to troubleshoot your problem XD

    And btw, that script won't attack a chicken... read some tut's XD
    It'll just move the mouse over a chicken (if it even finds one, cause it has ONE color finder...)
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

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

    Default

    Put SetupSRL; in your main loop.

  4. #4
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol that too XD
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  5. #5
    Join Date
    Jan 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by bullzeye95 View Post
    Put SetupSRL; in your main loop.
    seems to work now and makes the math error go away thanks.

    but.. doesnt seem to move to the color.

    Quote Originally Posted by rotflmfwao View Post
    -First off, do you have SCAR Divi and the newest SRL?
    -Did you copy the plugins from 'Copy this to plugins' (sumthin like that XD) into the plugins folder? (You have to say yes to replace all)
    -Did you install SRL (read the 'How to install' forum)

    If you did all these things post and I'll think of a new way to troubleshoot your problem XD

    And btw, that script won't attack a chicken... read some tut's XD
    It'll just move the mouse over a chicken (if it even finds one, cause it has ONE color finder...)
    oh... i didnt do the plugin thing or w/e ill go do that.
    + i know it wont work or w/e on the chicken killing but it is just a script to help me check n test commands and procedures so i can actually make one that will.


    umm.. actually the way i downloaded SRL is from Scar itself.... should i get it from the site instead?

  6. #6
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Downloading SRL from SCAR is fine.

    And for your chicken thingy, you'd want
    Mouse, not MMouse
    and FindObjMulti, not FindColor.
    And a lot more. Not to be rude, but that chicken script sux . Its a good frame tho
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  7. #7
    Join Date
    Jan 2007
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rotflmfwao View Post
    Downloading SRL from SCAR is fine.

    And for your chicken thingy, you'd want
    Mouse, not MMouse
    and FindObjMulti, not FindColor.
    And a lot more. Not to be rude, but that chicken script sux . Its a good frame tho
    hahah dont worry dude today and yesterday are my first experience ever with any code or any scripting... lol so i got srl all good now and got the script to work.

    k found the plugins too.

    and can you explain the FindObjMulti a little if its not too much =) + will add rep for your help.

  8. #8
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll explain it anyways. (btw, rep doesn't really matter here XD)

    FindObjMulti is an SRL function, so make sure you have
    SCAR Code:
    {.Include SRL/SRL.scar}
    right after you name the program and
    SCAR Code:
    SetupSRL;
    in your Main Loop.

    Here is the, um, I dunno, instructions for FindObjMulti:
    SCAR Code:
    {*******************************************************************************
    function FindObjMulti(Text: String; color1, color2, color3, tolerance: Integer): Boolean;
    By: Unknown and modified by Ron.
    Description: FindsObject using three colors
    *******************************************************************************}

    Here's an explanation:
    SCAR Code:
    FindObjMulti('Put the text that would be in the upper-left corner for the object here',Put one color of the object here, Put a second color here, Put one more color here, just put 10 or 20 here)

    You'll probably want something like this:

    SCAR Code:
    Var
      coord:TPoint;
    Begin
      If (FindObjMulti('icken',11382457,13355986,10329769,10)) Then
        Begin
          GetMousePos(coord.x,coord.y);
          Mouse(coord.x,coord.y,2,2,false);
          PopUp('ttack');
        End;
    End;

    You could use other FindObj functions, just go to SRL/SRL/core/Object.scar in your SCAR origram files file, and look for instructions there. If you need help with another FindObj function, PM me

    EDIT: I wouldn't use FindObjMulti, I'd use FindObjMultiText (PM me if you don't get the instructions in the SRL/SRL/core/Object.scar file) I just like FindObjMultiText better XD
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. i dont get it
    By sjlou in forum OSR Help
    Replies: 4
    Last Post: 09-13-2007, 04:53 PM
  2. i really dont know what to do
    By ShowerThoughts in forum OSR Help
    Replies: 7
    Last Post: 07-27-2007, 09:23 PM
  3. I dont get it...
    By grimey in forum OSR Help
    Replies: 2
    Last Post: 06-23-2007, 04:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •