Results 1 to 7 of 7

Thread: error over here :(

  1. #1
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default error over here :(

    well, i wanne load dtms that depends on users string, but yea i got error at begin of case
    can someone plz help me?

    SCAR Code:
    procedure LoadDTM;
    begin
      Pike := DTMFromString('78DA63146160609064400131B5E10CFF81342' +
           '310FF0702460E204381010D302291405A1C48081050234184392A' +
           '404290801A4520C145400D1F909020A0861F4828E1570300279F0' +
           '7AE');
      Trout:= DTMFromString('78DA637465626078C580024E1D3AC46004A41' +
           '981F83F10307A01D5BC6340038C482490B622428D0750CD1D026A' +
           '82816A6E1050130654731FBF1A002BF30DAD');
      Salmon:= DTMFromString('78DA637465626078C180023614A6301801694' +
           '620FE0F048C5E4035EF18D000231209A4AD806ADE1350E3015473' +
           '87809A60A09A1B04D48401D5DCC7AF060091F20CE3');
      Shrimp:= DTMFromString('78DA63B463626078CA8002167637301801694' +
           '620FE0F048C20357718D000231209A4FD816A6E1350E30B54F388' +
           '809A60A09A1704D4B803D57C22A0C61AA8E6157E3500958B0E2C');
      Beef:= DTMFromString('78DA63F460626078CA800216280B311801694' +
           '620FE0F048C2035F719D000231209A4FD806AAE1150134C849A30' +
           'A09A3B04D4F803D5BC27A0C613A8E6330135364498638D193EE86' +
           'A001F7A0FC8');
      case lowercase(Players[CurrentPlayer].String1) of//i get error here
        'pike': begin;
                  TheDTM:= Pike;
                  FreeDTM(Trout);
                  FreeDTM(Salmon);
                  FreeDTM(Shrimp);
                  FreeDTM(Beef);
                end;
        'trout': begin
                   TheDTM:= Trout;
                   FreeDTM(Pike);
                   FreeDTM(Salmon);
                   FreeDTM(Shrimp);
                   FreeDTM(Beef);
                 end;
        'salmon': begin
                    TheDTM:= Salmon;
                    FreeDTM(Pike);
                    FreeDTM(Trout);
                    FreeDTM(Shrimp);
                    FreeDTM(Beef);
                  end;
        'shrimp': begin
                     TheDTM:= Shrimp;
                     FreeDTM(Pike);
                     FreeDTM(Trout);
                     FreeDTM(Salmon);
                     FreeDTM(Beef);
                   end;
        'beef': begin
                  TheDTM:= Beef;
                  FreeDTM(Pike);
                  FreeDTM(Trout);
                  FreeDTM(Salmon);
                  FreeDTM(Shrimp);
                end;
      else
      begin
        Writeln('Invalid option! -look at your settings!');
        Writeln('Quiting script.');
        Terminatescript;
      end;
      end;
    end;
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  2. #2
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    knowing that you declared all of those variables (pike, trout, salmon, shrimp, beef, and thedtm), you don't have DeclarePlayers; and SetupSrl; Before LoadDtm; causing an out of range error.

  3. #3
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    procedure LoadDTM;
    begin
      case lowercase(Players[CurrentPlayer].String1) of//i get error here
        'pike':   DTM := DTMFromString('78DA63146160609064400131B5E10CFF81342' +
           '310FF0702460E204381010D302291405A1C48081050234184392A' +
           '404290801A4520C145400D1F909020A0861F4828E1570300279F0' +
           '7AE');
        'trout':  DTM:= DTMFromString('78DA637465626078C580024E1D3AC46004A41' +
           '981F83F10307A01D5BC6340038C482490B622428D0750CD1D026A' +
           '82816A6E1050130654731FBF1A002BF30DAD');
        'salmon': DTM:= DTMFromString('78DA637465626078C180023614A6301801694' +
           '620FE0F048C5E4035EF18D000231209A4AD806ADE1350E3015473' +
           '87809A60A09A1B04D48401D5DCC7AF060091F20CE3');
        'shrimp': DTM:= DTMFromString('78DA63B463626078CA8002167637301801694' +
           '620FE0F048C20357718D000231209A4FD816A6E1350E30B54F388' +
           '809A60A09A1704D4B803D57C22A0C61AA8E6157E3500958B0E2C');
        'beef':   DTM:= DTMFromString('78DA63F460626078CA800216280B311801694' +
           '620FE0F048C2035F719D000231209A4FD806AAE1150134C849A30' +
           'A09A3B04D4F803D5BC27A0C613A8E6330135364498638D193EE86' +
           'A001F7A0FC8');
        else
        begin
          Writeln('Invalid option! -look at your settings!');
          Writeln('Quiting script.');
          Terminatescript;
        end;
      end;
    end;

    Though I doubt that I fixed your problem. Like RS Monkey said, the error's probably somewhere else in your code.
    Interested in C# and Electrical Engineering? This might interest you.

  4. #4
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    SCAR Code:
    procedure LoadDTM;
    begin
      case lowercase(Players[CurrentPlayer].String1) of//i get error here
        'pike':   DTM := DTMFromString('78DA63146160609064400131B5E10CFF81342' +
           '310FF0702460E204381010D302291405A1C48081050234184392A' +
           '404290801A4520C145400D1F909020A0861F4828E1570300279F0' +
           '7AE');
        'trout':  DTM:= DTMFromString('78DA637465626078C580024E1D3AC46004A41' +
           '981F83F10307A01D5BC6340038C482490B622428D0750CD1D026A' +
           '82816A6E1050130654731FBF1A002BF30DAD');
        'salmon': DTM:= DTMFromString('78DA637465626078C180023614A6301801694' +
           '620FE0F048C5E4035EF18D000231209A4AD806ADE1350E3015473' +
           '87809A60A09A1B04D48401D5DCC7AF060091F20CE3');
        'shrimp': DTM:= DTMFromString('78DA63B463626078CA8002167637301801694' +
           '620FE0F048C20357718D000231209A4FD816A6E1350E30B54F388' +
           '809A60A09A1704D4B803D57C22A0C61AA8E6157E3500958B0E2C');
        'beef':   DTM:= DTMFromString('78DA63F460626078CA800216280B311801694' +
           '620FE0F048C2035F719D000231209A4FD806AAE1150134C849A30' +
           'A09A3B04D4F803D5BC27A0C613A8E6330135364498638D193EE86' +
           'A001F7A0FC8');
        else
        begin
          Writeln('Invalid option! -look at your settings!');
          Writeln('Quiting script.');
          Terminatescript;
        end;
      end;
    end;

    Though I doubt that I fixed your problem. Like RS Monkey said, the error's probably somewhere else in your code.
    just that? ok i'll give it a try thanks guys

    EDIT: btw why the "DTM" in there?
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  5. #5
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    still same error:
    [Runtime Error] : Out Of Range in line 71 in script
    EDIT: sorry for double post
    2nd EDIT: Hooray!!!! finally stupid bug!! thank you, i love you rs monnkey!
    dtm setup before declare players, rofl
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  6. #6
    Join Date
    Apr 2007
    Location
    California
    Posts
    259
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He just changed it so that instead of loading all of them, and then freeing some if they aren't using it, it will only load the one they need, and set it to the variable name DTM.

    You'll have to post the rest of your script if you want more help, or try doing what The Rs Monkey said.

  7. #7
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NewToAutoing View Post
    He just changed it so that instead of loading all of them, and then freeing some if they aren't using it, it will only load the one they need, and set it to the variable name DTM.

    You'll have to post the rest of your script if you want more help, or try doing what The Rs Monkey said.
    did last thing
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

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

Posting Permissions

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