Results 1 to 8 of 8

Thread: Repeat loop runtime error??? Huh????

  1. #1
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Repeat loop runtime error??? Huh????

    Alright, here is the little script, and I wanna know why the heck it gives me this error:
    [Runtime Error] : Type Mismatch in line 16 in script C:\Program Files\SCAR 3.15\Scripts\Reflections record path.scar
    SCAR Code:
    program DebugNPCs;

    {.include srl/srl/misc/smart.scar}
    {.include srl/srl.scar}
    {.include srl/srl/reflection/reflection.scar}

    var
      i:integer;
      NPCs:array of TNPC;
      s:string;
      p:TPoint;
     
    begin
      SetupSRL;
      repeat
        wait(800);//line 16
        if IsFKeyDown(2) then
        begin
          try
            ClearDebug;
            NPCs := SortNPCs(GetNPCs);
            //NPCs := SortNPCs(GetNPCsByID(3795));
            p := GetMyPos;
            writeln('Tile ('+inttostr(p.x)+', '+inttostr(p.y)+')');
            writeln('MS   ('+inttostr(TileToMS(p,20).x)+', '+inttostr(TileToMS(p,20).y)+')');
            Writeln('NPCs on screen: '+inttostr(GetArrayLength(NPCs)));
            for i := 0 to High(NPCs) do
            begin
              s := padr(NPCs[i].Name,20);
              s := s + ' ID: '+padr(inttostr(NPCs[i].NPCType),7);
              s := s + '  ('+inttostr(NPCs[i].Tile.X)+', '+inttostr(NPCs[i].Tile.Y)+')';
              s := s + '  In Fight: '+BoolToStr(NPCs[i].InFight);
              s := s + '  Is Moving: '+BoolToStr(NPCs[i].IsMoving);
              Writeln(s);
            end;
            sleep(1500);
          except
            writeln('oh noes!')
            sleep(1500);
          end;
        end;
      until False;
    end.
    thanks a lot,
    -Pure1993
    There is nothing right in my left brain and there is nothing left in my right brain.

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

    Default

    setupreflection pl0x?
    ~Hermen

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

    Default

    Quote Originally Posted by Hermpie View Post
    setupreflection pl0x?
    SetUpReflection isn't needed anymore..!

    -Tsn.
    [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]

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

    Default

    How it loads then?

    Didn't load smart?
    ~Hermen

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

    Default

    Quote Originally Posted by Hermpie View Post
    How it loads then?

    Didn't load smart?
    I edited it, so it loads smart and logs in my character.
    I pressed F2, info gets printed out in debug box, and I get an error aswell, referring to the wait procedure :S

    -Tsn.
    [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
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    U are not set upping smart!!!
    ~Hermen

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

    Default

    Quote Originally Posted by Hermpie View Post
    U are not set upping smart!!!
    *sigh* first of all its "setting up", not "set upping"
    And secondly, as I've stated above, I tried it (edited version which loads smart & logs in player) and i get an error aswell :S

    -Tsn.
    [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]

  8. #8
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol, hermpie, you just got owned big time
    I set up my smart so I don't need all the extra lines (you know, editing the srl.scar and smart.scar things).
    But, I'd really like to have an answer, because I need this to update my tut runner to reflections...
    There is nothing right in my left brain and there is nothing left in my right brain.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Main loop error or my error?
    By Bonfield in forum OSR Help
    Replies: 7
    Last Post: 03-02-2008, 03:10 AM
  2. Fail-safes, repeat and loop tutorial
    By solemn wishes in forum Outdated Tutorials
    Replies: 15
    Last Post: 12-12-2007, 09:22 AM
  3. Replies: 10
    Last Post: 09-13-2007, 09:27 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
  •