Results 1 to 11 of 11

Thread: DeclareDTMS Error???

  1. #1
    Join Date
    Jun 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DeclareDTMS Error???

    I'm getting two error messages and I don't understand why. Simple DeclareDTMS procedure is where I'm getting it. What did I leave out?

    SCAR Code:
    Procedure DeclareDTMS;
    begin
      Log := DTMFromString('78DA6314636060106240019531160CFF81342' +
           '310FF07024651204396010D302291405A1E48481150A30A248409' +
           'A85100121C04D4F0020969026AD809DB0500FCF00752');
      Knife := DTMFromString('78DA6314656060106140012539D90CFF81342' +
           '310FF0702466920838F010D302291405A1648B013502306247808' +
           'A8E107125204D4F002096522EC12C7AF0600188C0779');
      ShortBow := DTMFromString('78DA639460606010654001D525DA0CFF81342' +
           '310FF07024619204398010D302291405A01487012500332878780' +
           '1A4120214E400D07909025C21C29FC6A00F896074F');
      LongBow := DTMFromString('78DA6394606060106640015B57DB33FC07D28' +
           'C40FC1F081845810C1E0634C0884402693E22D448030971026AE4' +
           '8084020135207979026A6409DB05006F9E07F8');
      BowString := DTMFromString('78DA631465606010664001CD1591609A11CA6' +
           '7140212DC0C688011550D2FA639186AF881842C0135D240428180' +
           '1A0D202141400D489E07BF1A00D9210299');
      StrungShort := DTMFromString('78DA6394626060106140013565BA0CFF81342' +
           '310FF07024605208397010D302291405A0548701250230B24B808' +
           'A8110012C204D480EC9125A0066486147E3500FD4C0754');
      StrungLong := DTMFromString('78DA631467606010664001DBD63832FC07D28' +
           'C40FC1F081805800C6E0634C0884402691E20C147408D10901025' +
           'A0460A48C81150A300249409A8910112E2F8D50000658207E7');
    end;

    The error messages are:
    Line 65: [Error] (12333:1): Identifier expected in script C:\Documents and Settings\...\My SRL Fletcher1.scar
    Line 65: [Error] (12333:1): Duplicate identifier '' in script C:\Documents and Settings\...\My SRL Fletcher1.scar
    Line 65 is the first line of what I posted. Is all this right or do you need more info?

  2. #2
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Im like 99.99% Sure you are missing an "end;" in the thing above DeclareDTMs.

  3. #3
    Join Date
    Jun 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is everything above the DeclareDTMS:

    SCAR Code:
    //------------------Declare Players Below--------------------\\
    procedure DeclarePlayers;
    begin
       HowManyPlayers := 1;
       CurrentPlayer := 0;

       Players[0].Name :='*****';       // Character Name
       Players[0].Pass :='****';          // Password
       Players[0].Nick :='***';            // 3 letters from the middle of Name
       Players[0].Active:= True;          // Are you using this player
       Players[0].Strings[0] := '0000';   // Bank PIN, If needed.
    end;

    //-----------------------SetUp Below--------------------------\\
    const
      Bows = 82;        // Set number of bows to Fletch
      Logs = 'map';     // Log Type
      Btype = 'long';   // Set to Long or Short bow
      Loc1 = 'akb';     // Bank Location - Valid arguments are:
                        //   'feb' (Falador East Bank)
                        //   'fwb' (Falador West Bank)
                        //   'veb' (Varrock East Bank)
                        //   'vwb' (Varrock West Bank)
                        //   'db'  (Draynor Bank)
                        //   'akb' (Al-Kharid Bank)

    //---------------------Do Not Change Below---------------------\\

    //---------------------Needed Information----------------------\\
    var
      Log, Knife, ShortBow, LongBow, BowString, StrungShort,
      StrungLong, StartXP, EndXP, TotalXP, UnStrungs, BowsStrung,


    I didn't think you needed an "end;" after var or const.

  4. #4
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    var
      Log, Knife, ShortBow, LongBow, BowString, StrungShort,
      StrungLong, StartXP, EndXP, TotalXP, UnStrungs, BowsStrung,

    need to be:
    SCAR Code:
    var
      Log, Knife, ShortBow, LongBow, BowString, StrungShort,
      StrungLong, StartXP, EndXP, TotalXP, UnStrungs, BowsStrung;

  5. #5
    Join Date
    Jun 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OK that was just me being an idiot, I hadn't put the semi-colon cause I know I will have more variables to add. But now that I put the semi-colon there i get:

    Line 62: [Error] (12330:59): colon (':') expected in script C:\Documents and Settings\...\My SRL Fletcher1.scar
    Line 62 is the last line of my "var" where I just put the semi-colon. So now I'm even more confused.

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    var
      Log, Knife, ShortBow, LongBow, BowString, StrungShort,
      StrungLong, StartXP, EndXP, TotalXP, UnStrungs, BowsStrung;
     :integer;
    ~Hermen

  7. #7
    Join Date
    Aug 2007
    Posts
    53
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just to be more perfect:

    SCAR Code:
    var
      Log, Knife, ShortBow, LongBow, BowString, StrungShort,
      StrungLong, StartXP, EndXP, TotalXP, UnStrungs, BowsStrung
     :integer;

  8. #8
    Join Date
    Jun 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool... Thanks! What exactly is that for though?

  9. #9
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you must declare your variables as a certain type before you can use them. FOr example,

    x,y,a,b : integer;
    thebank,thetime : string;
    state : boolean;

  10. #10
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    You have to define what your variables are.

    Is the word "BowString" a String, an integer, extended or a boolean?

    If it is a bitmap / DTM, then it will be an Integer. All bitmaps / DTMs are Integers
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  11. #11
    Join Date
    Jun 2007
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks so much. Now I understand. I was just declaring variables I didn't know that about what type. Time go back and re-read a tutorial or two.

    Thanks

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 AM
  4. Error: Cannot Fix Script - Error Overgrowth - Begin Headdesking
    By PhantasmalScripter in forum OSR Help
    Replies: 6
    Last Post: 12-23-2006, 12:50 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
  •