Results 1 to 10 of 10

Thread: [Error] (1:1): Unexpected end of file at line 0

  1. #1
    Join Date
    Oct 2011
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Error] (1:1): Unexpected end of file at line 0

    Code:
    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed.
    What does that mean?!?......^.....

  2. #2
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    can you post the script you were using?

  3. #3
    Join Date
    Oct 2011
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its a script i'm trying to make

    Simba Code:
    program SapphireEnchant;

     {$DEFINE SMART}
     {$i SRL\SRL.scar}

    var x, y, sx, sy, rx, ry, r, c, banked, casts, Ench: Integer;
        Staff, Rune, Spell: Boolean;
        Str: TStringArray;
        T: TPoint;

    procedure DeclarePlayers;
    begin
      NumberOfPlayers(1);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Name   := '';
        Pass   := '';
        Active := True;
        Pin    := '';
        Strings:= ['Sapphire', 'Ring'];
        //________[   Jewl   ,  type ];
      end;
    end;


    procedure Load;
    begin
      case Players[0].Strings[0] of      // the DTM's are for the spell...

        'Sapphire'   : begin
                          Ench:= DTMFromString('m6wAAAHic42ZgYGhlYmDoAOJuIG4A4mYobgfiLqh4B1TMkxEVuwGxExQ7A7EvEPtDMafrRwae7F8MBvLMYPz792+G78+5GEpiDYDYEMw/tECAIduHhYEV6A5iMSMJGAkAADhqGJ4=');
                          case Players[0].Strings[1] of
                            'Ring'     : Str[2] := 'of recoil';
                            'Necklace' : Str[2] := 'Games';
                            'Bracelet' : Str[2] := 'of clay';
                            'Amulet'   : Str[2] := 'of magic';
                          end;
                       end;
        'Emerald'    : begin
                          Ench:= DTMFromString('');
                          case Players[0].Strings[1] of
                            'Ring'     : Str[2] := 'dueling';
                            'Necklace' : Str[2] := 'Binding';
                            'Bracelet' : Str[2] := 'Castle wars';
                            'Amulet'   : Str[2] := 'of defence';
                          end;
                       end;
        'Ruby'       : begin
                          Ench:= DTMFromString('');
                          case Players[0].Strings[1] of
                            'Ring'     : Str[2] := 'of forging';
                            'Necklace' : Str[2] := 'pendant';
                            'Bracelet' : Str[2] := 'Inoculation brace';
                            'Amulet'   : Str[2] := 'of strength';
                          end;
                       end;
        'Diamond'    : begin
                          Ench:= DTMFromString('');
                          case Players[0].Strings[1] of
                            'Ring'     : Str[2] := 'of life';
                            'Necklace' : Str[2] := 'Phoenix ';
                            'Bracelet' : Str[2] := 'Forinthry ';
                            'Amulet'   : Str[2] := 'of power';
                          end;
                       end;
        'Dragonstone': begin
                          Ench:= DTMFromString('');
                          case Players[0].Strings[1] of
                            'Ring'     : Str[2] := 'of wealth';
                            'Necklace' : Str[2] := 'Skills ';
                            'Bracelet' : Str[2] := 'Combat ';
                            'Amulet'   : Str[2] := 'of glory';
                          end;
                       end;
      end;

      Str[0] := Players[0].Strings[1];

      Str[1] := Players[0].Strings[0];

    end;
    Function Check: Boolean;
    var Cosm: Integer;
    begin

    WriteLn('Check started');


      if not LoggedIn then
        Exit;


      if BankScreen then
        CloseBank;
      Wait(RandomRange(700, 1200));

      //MakeCompass(90 + RandomRange(-50, 50));

      GameTab(tab_magic);
      Wait(RandomRange(1000, 2000));


      if findDTM(Ench, sx, sy, MIX1, MIY1, MIX2, MIY2) then
      begin
        Spell:=True;  //would be nice to add here something that puts the spell near the middle of the inv...
      end else
      begin
        WriteLn('The ' + Str[1] +' enchant spell was not found.');
        TerminateScript;
      end;
      WriteLn('The spell coords are: ' + IntToStr(sx) + '  ' + IntToStr(sy));
      FreeDTM(Ench);


      GameTab(tab_Inv);
      Wait(RandomRange(1000, 2000));
        Cosm := DTMFromString('m6wAAAHic42ZgYFBjZWCQAmJ5IFYBYl0gNoLSSkAsA8RiQKwBxJ1MDAwdQNwHxBOYIHwQngbEM4F4KhD3A3ErEF+7LIeBGRiYGOorK8G0qrIymAaJ8wNZxGJGEjASAAD13RU5');
      if FindDTM(Cosm, rx, ry, MIX1, MIY1, MIX2, MIY2) then
      begin
        WriteLn('Cosmics found');
        Spell:=True;
      end else
      begin
        WriteLn('The cosmic runes were not found.');
        TerminateScript;
      end;
       c := CoordsToItem(rx, ry);
      WriteLn('Cosmics in inv #' + IntToStr(c));
      FreeDTM(Cosm);

      {
      GameTab(tab_Equip);                                           //
      Wait(RandomRange(1000, 2000));                                //  >.<
      if WearingItem(5) then                                        //
      begin                                                         //
        MouseEquippedItem('weapon', 2);                             //  just realised that
        Wait(RandomRange(175, 350));                                //
        if WaitOption(st, 2000) or WaitOption(st2, 2000) then       //
        begin                                                       //  i don't need this...
          Staff := True;                                            //
          WriteLn('Staff := True;');                                //
        end;                                                        //  ........
      end else                                                      //
      begin                                                         //
        WriteLn('You were not wearing the right staff');            //
        TerminateScript;                                            //
      end;                                                          //
      }

      Result := Staff and Rune and Spell;
    end;

    Function Bank: Boolean;
    var i_Inv, i_Bnk, w: Integer;
        Depos: Boolean;
    begin
      WriteLn('Bank function started');

      if not BankScreen then
        OpenBankFast('vwb');

      if not Depos then
      begin
      for i_Inv := 0 to 27 do
        if not i_Inv=c then
        begin
          InvMouse(i_Inv, 2);
          if WaitOptionMultiEx([Str[2], 'Deposit', 'All'], 'item', ClickLeft, 600) then
          begin
            Inc(banked);
            Depos := True;
            Continue;
          end else
          begin
            GetMousePos(x, y);           //this gets rid of the option menu
            MMouse(x-50, y-50, 20, 20);  //before trying again
            Inc(i_Inv);
          end;
        end else
          Inc(i_Inv);
      end;

      if Depos then
      begin
      if banked=0 then
        begin
          for i_bnk:= 0 to 50 do
          begin
            T := BankIndexToMSPoint(i_Bnk);
            MMouse(T.x, T.y, 31, 32);
            if WaitUpText(Str[1], 700) then
            begin
              T := BankIndexToBankPoint(i_bnk);
              WithdrawEx(T.x, T.y, 0, [str[0], str[1]]);
              w := 0
              repeat
                Wait(200);
                Inc(w);
                if InvFull then
                  Continue;
              until(w>=15) or (InvFull);
              if InvFull then
                Continue;
            end;
          end;
        end else
        begin
          WithdrawEx(T.x, T.y, 0, [str[0], str[1]]);



        end;
      end;

    end;

    Procedure Enchant;
    begin

    end;

    begin
     MouseSpeed := RandomRange(16, 19);

     Smart_Server := 28;
     Smart_Members := True;
     Smart_Signed := True;
     Smart_SuperDetail := False;

     SetupSRL;
     DeclarePlayers;
     LogInPlayer;

     Load;
     Check;

     if not (Staff and Rune and Spell) then
     begin
        repeat
          WriteLn('Repeat started');
          if Bank then
          begin
            WriteLn('Enchant started');
            Enchant;
          end;
        until(False);
     end else
     begin
        WriteLn('The check failed...');
        TerminateScript;
     end;

  4. #4
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    You need an "end." at the very end of the script.

  5. #5
    Join Date
    Oct 2011
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol...that it? >.< ...silly me :P

    E: Does the rest of the script look O.K. tho?

  6. #6
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by logical View Post
    Does the rest of the script look O.K. tho?
    if you don't care about standards, yes.

  7. #7
    Join Date
    Oct 2011
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by footballjds View Post
    if you don't care about standards, yes.
    What does that mean?

  8. #8
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by logical View Post
    What does that mean?
    Lets say you wrote a 10 page essay on 8.5 x 11 inch paper. Plain white paper with no lines. So although your essay may be well written it to the eye looks quite confusing, not aligned correctly, etc.

  9. #9
    Join Date
    Feb 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed. ((( how do i finish it it keep saying this

  10. #10
    Join Date
    Feb 2007
    Location
    PA, USA
    Posts
    5,240
    Mentioned
    36 Post(s)
    Quoted
    496 Post(s)

    Default

    Quote Originally Posted by 9a0a0a01 View Post
    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed. ((( how do i finish it it keep saying this
    Please post the code of the script you're using here or pm if it's your personal private script and I'll tell you.

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
  •