Results 1 to 6 of 6

Thread: Simple Error (I think :o)

  1. #1
    Join Date
    Jul 2008
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Simple Error (I think :o)

    Hi, i'm new to scripting and i'm working on a very simple script that looks like this..

    SCAR Code:
    program Treechopper;
    {.include SRL/SRL/misc/SMART.scar}
    {.include srl/srl.scar}
    const
    TreeColor= (3765866); // Color of the Tree you want to cut
    Var x, y :integer;


    procedure DeclarePlayers;
    begin
     NumberOfPlayers(1);
     CurrentPlayer :=0

     Players[0].Name:= '';  //username
     Players[0].Pass:= '';  //password
     Players[0].Nick:= '';  //3-4 letters of username
     Players[0].Active:= True;
    end;

    Procedure Logmein;
    Begin
    Cleardebug;
    if (not(LoggedIn)) then
    Begin
     LoginPlayer;
     Wait(1000+random(3000));
     MakeCompass('N');
    end;

    Procedure Choptree;
    Begin
     if(Findcolor(x,y,treecolor,5,5,515,340))then
     Mouse(x,y,2,2,false);
     Wait(100 + Random(100));
     if IsUpText('hop') then
     Mouse(x, y, 2, 2, True);
    writeln('Chopped a tree :O');
    Wait(5000)
    end;

    Begin
      SMARTSetUpEX(55, False, True, False);
    SetTargetDC(SMARTGetDC);
    wait(12000)
    SetupSRL;
    Disguise('LimeWire');
    DeclarePlayers;
    if (not(LoggedIn)) then Logmein;
    repeat
    choptree;
    until(false);
    end.

    .. and i get this error Failed when compiling
    Line 30: [Error] (16645:1): Identifier expected in script C:\Users\Administrator\Desktop\Billy s Stuff\Billy's Powerchopper.scar
    I know it's probably simple, but pleeasse helpp mee!

  2. #2
    Join Date
    Sep 2006
    Location
    Canada
    Posts
    1,124
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Your missing a end; in the logmein procedure.

  3. #3
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add an end; line before line procedure. You had 2 begins and one end.

  4. #4
    Join Date
    May 2008
    Posts
    1,345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure Logmein;
    Begin
    Cleardebug;
    if (not(LoggedIn)) then
    Begin
     LoginPlayer;
     Wait(1000+random(3000));
     MakeCompass('N');
    end;

    You're missing an end. For every begin, you MUST have an end.

    SCAR Code:
    Procedure Logmein;
    Begin
    Cleardebug;
      if (not(LoggedIn)) then
      Begin
       LoginPlayer;
       Wait(1000+random(3000));
       MakeCompass('N');
      end;
    end;

    Feel free to PM me if you want some help!

    ~Sandstorm

  5. #5
    Join Date
    Jul 2008
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ohh I feel like an idiot
    wowowow and i will PM you sandstorm next time i need help

  6. #6
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    dont worry dude, we all make mistakes =p

    heck, nava's abby runecrafter was missing atleast 10 semicolons

    but im also available for help if you need it
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Simple (I think) error.
    By Oranges_Exist in forum OSR Help
    Replies: 2
    Last Post: 03-20-2008, 04:17 AM
  2. simple error?
    By strongman in forum OSR Help
    Replies: 2
    Last Post: 09-29-2007, 01:51 AM
  3. ~Another Simple Error~
    By Ephraim2007 in forum OSR Help
    Replies: 10
    Last Post: 05-07-2007, 12:32 AM
  4. Need help, only having one simple error!
    By Kinthral in forum OSR Help
    Replies: 4
    Last Post: 05-03-2007, 03:45 PM

Posting Permissions

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