Results 1 to 10 of 10

Thread: A simple code,with an error i cant find.

  1. #1
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default A simple code,with an error i cant find.

    Simba Code:
    program New;
    {$i srl/srl/misc/smart.scar}
    {$i sps/sps.simba}
    {.include srl/srl.scar}
     {$i SRL\SRL\Misc\Stats.simba}
     var  x, y, rx, ry: Integer;
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :=' ';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure SPS_Setup(surface: integer; areas: TStringArray);
    SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
    pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
    Procedure ChopTree;
    Var
    x,y: Integer;
    Begin;
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, true);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
      End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn)then
    Exit;
    Case Random(8)of
    0:
    Begin;
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
    1: Wait(100);
    2 : PickUpMouse;
    End
    If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
    begin
    Mouse(x,y,5,5,true);
      End;
     end;
    Procedure Start;
    Begin
    MakeCompass('N');
    Wait(100+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
      End;

    begin;
      Smart_Server := 1;
      Smart_Members := False;
      Smart_Signed := false;
      Smart_SuperDetail := False;
      ClearDebug;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.

    Error:
    [Error] C:\Simba\Includes\sps/sps.simba(136:34): Unknown identifier 'MMCX' at line 135
    Compiling failed.

  2. #2
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Put "{$i sps/sps.simba}" after "{.include srl/srl.scar}", like this:
    Simba Code:
    {.include srl/srl.scar}
    {$i sps/sps.simba}

  3. #3
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    program New;
    {$i srl/srl/misc/smart.scar}
    {$i sps/sps.simba}
    {.include srl/srl.scar}
    {$i sps/sps.simba}"
     {$i SRL\SRL\Misc\Stats.simba}
     var  x, y, rx, ry: Integer;
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :=' ';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure SPS_Setup(surface: integer; areas: TStringArray);
    SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
    pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
    Procedure ChopTree;
    Var
    x,y: Integer;
    Begin;
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, true);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
      End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn)then
    Exit;
    Case Random(8)of
    0:
    Begin;
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
    1: Wait(100);
    2 : PickUpMouse;
    End
    If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
    begin
    Mouse(x,y,5,5,true);
      End;
     end;
    Procedure Start;
    Begin
    MakeCompass('N');
    Wait(100+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
      End;

    begin;
      Smart_Server := 1;
      Smart_Members := False;
      Smart_Signed := false;
      Smart_SuperDetail := False;
      ClearDebug;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.



    [Error] (136:34): Unknown identifier 'MMCX' at line 135
    Compiling failed.
    I dont know whats wrong.

  4. #4
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Simba Code:
    program New;
    {$i srl/srl/misc/smart.scar}
    {.include srl/srl.scar}
    {$i sps/sps.simba}
    {$i SRL\SRL\Misc\Stats.simba}

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

    Default

    Thanks!Now i got other error :_
    Simba Code:
    program New;
    {$i srl/srl/misc/smart.scar}
    {.include srl/srl.scar}
    {$i sps/sps.simba}
    {$i SRL\SRL\Misc\Stats.simba}
     var  x, y, rx, ry: Integer;
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :=' ';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure SPS_Setup(surface: integer; areas: TStringArray);
    SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
    pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
    Procedure ChopTree;
    Var
    x,y: Integer;
    Begin;
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, true);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
      End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn)then
    Exit;
    Case Random(8)of
    0:
    Begin;
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
    1: Wait(100);
    2 : PickUpMouse;
    End
    If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
    begin
    Mouse(x,y,5,5,true);
      End;
     end;
    Procedure Start;
    Begin
    MakeCompass('N');
    Wait(100+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
      End;

    begin;
      Smart_Server := 1;
      Smart_Members := False;
      Smart_Signed := false;
      Smart_SuperDetail := False;
      ClearDebug;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.

    [Error] (19:11): Duplicate identifier 'SPS_SETUP' at line 18
    Compiling failed.

  6. #6
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,194
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    Might want to change

    Code:
    {.include SRL/SRL.scar}
    to

    Code:
    {$I SRL/SRL.scar}
    E: you are calling it as a Proc in your script for some reason around line 18

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

  7. #7
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Change:
    Simba Code:
    procedure SPS_Setup(surface: integer; areas: TStringArray);

    To:
    Simba Code:
    procedure SetupSPS(surface: integer; areas: TStringArray);

  8. #8
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by BraK View Post
    Might want to change

    Code:
    {.include SRL/SRL.scar}
    to

    Code:
    {$I SRL/SRL.scar}
    Got the same error.Thanks for help
    I will show where i get the error:
    Simba Code:
    program New;
    {$i srl/srl/misc/smart.scar}
    {$I SRL/SRL.scar}
    {$i sps/sps.simba}
    {$i SRL\SRL\Misc\Stats.simba}
     var  x, y, rx, ry: Integer;
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :=' ';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;
    procedure SPS_Setup(surface: integer; areas: TStringArray);

    SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
    pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];
    Procedure ChopTree;
    Var
    x,y: Integer;
    Begin;
    If FindObj(x,y,'hop',1785912, 35)Then
    Mouse(x,y,0,0, true);
    ChooseOption('Hop')
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
    Repeat
    Wait(1200+random(250));
    Until not IsUpText('Tree')or InvFull
      End;
    Procedure AntiBan;
    Begin
    If(Not LoggedIn)then
    Exit;
    Case Random(8)of
    0:
    Begin;
    HoverSkill('Woodcutting',false)
    Wait(2453+random(432));
    End;
    1: Wait(100);
    2 : PickUpMouse;
    End
    If(FindColorTolerance(x,y,857114,MMX1, MMY1, MMX2, MMY2, 5))then
    begin
    Mouse(x,y,5,5,true);
      End;
     end;
    Procedure Start;
    Begin
    MakeCompass('N');
    Wait(100+random(133));
    MakeCompass('S');
    Wait(50+random(133));
    MakeCompass('N')
      End;

    begin;
      Smart_Server := 1;
      Smart_Members := False;
      Smart_Signed := false;
      Smart_SuperDetail := False;
      ClearDebug;
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.

    procedure SPS_Setup(surface: integer; areas: TStringArray);

    SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
    pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651), Point(4569,3657) ];

    Error:
    [Error] (19:11): Duplicate identifier 'SPS_SETUP' at line 18
    Compiling failed.

  9. #9
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Change:
    Simba Code:
    procedure SPS_Setup(surface: integer; areas: TStringArray);
    To:
    Simba Code:
    procedure SetupSPS(surface: integer; areas: TStringArray);
    begin
      SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
      pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651),   Point(4569,3657) ];
    end;

  10. #10
    Join Date
    Dec 2011
    Posts
    212
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by RISK View Post
    Simba Code:
    procedure SetupSPS(surface: integer; areas: TStringArray);
    begin
      SPS_Setup(RUNESCAPE_SURFACE, ['12_7']);
      pts := [ Point(4705,3766), Point(4763,3760), Point(4714,3679), Point(4683,3651),   Point(4569,3657) ];
    end;
    How stupid i am,i forgot that
    Thanks for your patience.
    Edit:
    Now the DebgBox says that i should duplicate the SPS_Setup.


    Bump
    Last edited by Gaston7eze; 12-24-2011 at 02:48 PM.

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
  •