Results 1 to 11 of 11

Thread: Can somebody help me with my script? :)

  1. #1
    Join Date
    Mar 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Can somebody help me with my script? :)

    Ok so I've been trying to learn to script from YoHoJo's tutorials, Im getting a [Error] (99:27): Type mismatch at line 98, Im not sure what to do to fix this. If somebody would lend me a hand I would highly appreciate it. Heres what my script looks like I underlined the line it says the error is in.)


    Program PowerChopper;


    //{$DEFINE SMART}
    {$i SRL\SRL.simba}




    Const
    SRLSTATS_USERNAME = ''; // SRL Stats Username.
    SRLSTATS_PASSWORD = ''; // SRL Stats Password.
    BreakEvery= 120; // How many minutes to break after.
    BreakFor= '5'; // How long to break for.
    NumbOfPlayers= 1; // How many players are you using?
    StartPlayer= 0; // Player to start autoing with.
    Version= '1.0'; // NO TOUCHY!

    procedure DeclarePlayers;
    begin;
    HowManyPlayers := 1;
    NumberOfPlayers(HowManyPlayers);
    CurrentPlayer := 0;
    with Players[0] do
    begin;
    Name := ''; // Player Username
    Pass := ''; // Player Password
    Pin := ''; //Pin for bank
    Active := true;
    end;
    end;


    Procedure StatsGuise(wat:String);
    Begin;
    Status(wat);
    Disguise(wat);
    End;


    Procedure Antiban;
    Begin;
    Case Random(250) Of
    0: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('Woodcutting', False) GameTab(28) End;
    1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
    2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
    3: Begin StatsGuise('AntiBan') RandomAngle(1); End;
    4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(28); End;
    5: Begin StatsGuise('AntiBan') GameTab(tab_Stats) HoverSkill('random', False); GameTab(28); End;
    End;
    End;

    Procedure FailSafe(Reason:String);
    Begin;
    Players[CurrentPlayer].Loc:=Reason;
    Logout;
    Stats_Commit;
    //ProgressReport;
    TerminateScript;
    End;

    Function ChopDown:Boolean;
    Var
    x, y, PlusOne, TreeCounter:Integer;
    Begin
    PlusOne:= InvCount + 1;
    //FindObjCustom(x, y, ['att', 'ack'], [123456, 345678], 2;
    x:=MSCY;
    y:=MSCY;
    If FindObjTPA(x, y, 2965842, 10, 1, 15, 60, 600, ['Chop']) Then
    Begin;
    WriteLn('FK yea Ive found a tree, ima cut yu down!');
    GetMousePos(x, y);
    Case Random(2) of
    0: Mouse(x, y, 5, 5, True);
    1: Begin
    Mouse(x, y, 5, 5, False);
    WaitOption('Chop', 500);
    End;
    End;
    end;
    end;

    Procedure DropLogs;
    var
    x, y, I, LogDTM:Integer;
    SlotBox:TBox;
    LogPattern:TIntegerArray;

    Begin;

    LogDTM := DTMFromString('mlwAAAHicY2dgYMhlYmBIAOI4IC4G4iogLg PiHCDWZWRg0ARiUyg2BmIlIFYGYm8LRaBuJhwYN2DEg6EAAGDp BQY=');
    LogPattern:=[1,5,9,13,17,21,2,6,10,14,18,22,3,7,11,15,19,23,4,8 ,12,16,20,24];


    For I:=0 To 27 Do
    Begin;
    SlotBox:=InvBox(LogPattern(I));
    If FindDTm(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2)
    FindDTM() Then
    Begin;
    MouseItem(LogPattern(I),False);
    ChooseOption('Dro');
    End;
    End;


    Flag;


    Repeat;
    MarkTime(TreeCounter);
    Antiban;
    Wait(1000);
    If InvCount=PlusOne Then;
    Writeln('Muwahahaha!');
    Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 7000);
    End;

    End;














    begin
    ActivateClient;
    SetupSRL;
    DeclarePlayers;
    Repeat;
    ChopDown;
    Until(False);
    DropLogs;
    end.

  2. #2
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Simba Code:
    for I := 0 to 27 do
    begin
      SlotBox := InvBox(LogPattern(I));
      if FindDTM(OreMid, X, Y, SlotBox.X1, SlotBox.Y1, SlotBox.X2, SlotBox.Y2) then
      begin
        MouseItem(LogPattern(I), False);
        ChooseOption('Dro');
      end;
    end;

    remove the ';' from begin

    and the if FindDTM()

    please read up on coding standards.
    Last edited by ReadySteadyGo; 03-23-2012 at 12:27 AM.

  3. #3
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Your problem is your ; after Begin.
    To make your code easier to read, use Tab, and follow the above posts link.

  4. #4
    Join Date
    Mar 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Taking the ; off of begin didnt fix it

  5. #5
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It would help if you told us which line is 98. Also always add
    [ SIMBA ] before code and
    [ /SIMBA ] after.

    Without spaces of course

  6. #6
    Join Date
    Aug 2008
    Location
    London, UK
    Posts
    456
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by jkrules22 View Post
    Taking the ; off of begin didnt fix it
    did you even read what I posted?

  7. #7
    Join Date
    Mar 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by lilcmp1 View Post
    It would help if you told us which line is 98. Also always add
    [ SIMBA ] before code and
    [ /SIMBA ] after.

    Without spaces of course
    I did say which line is 98

  8. #8
    Join Date
    Mar 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ReadySteadyGo View Post
    did you even read what I posted?
    I did...

  9. #9
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    193
    Mentioned
    1 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by jkrules22 View Post
    I did...
    Remember that when you post something that has simba or scar code in it, and then you hit the edit button. It will all be screwed up, and you will have to copy and paste the code again.

  10. #10
    Join Date
    Dec 2011
    Posts
    195
    Mentioned
    2 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by ReadySteadyGo View Post
    please read up on coding standards.
    +
    http://villavu.com/forum/showthread.php?t=58935
    --- NexzAuto ---
    --- Simplicity is the ultimate sophistication. - Leonardo Da Vinci ---

  11. #11
    Join Date
    Mar 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok Ive figured it out, Sorry I should have read up before posting this.





    Ty all for the help

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
  •