Results 1 to 7 of 7

Thread: Reflection failed to detect OSRS?

  1. #1
    Join Date
    May 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Reflection failed to detect OSRS?

    I've just begun developing scripts for RS, I'm super excited to get started and I've chosen reflection as the library I wish to develop with first. However after getting my first script setup and running it I seem to have hit a snag, I tried simply searching my error but couldn't find any actual leads as to the cause of my issue.

    My Setup:
    Windows 10
    Java 1.7.0_80
    Simba v1100
    Reflection Include downloaded from GitHub repo

    My script compiles and Launches SMART, but then does nothing until it Fails to detect or load OSRS.
    Output Console:

    Code:
    Compiled successfully in 2922 ms.
    [16:04:08:208] [Reflection] [Warn] 'SmartWorld' variable not valid, trying recommended world...
    [16:04:09:020] [Reflection] [Status] Using world 6.
    [16:04:40:302] [Reflection] [Status] Paired with SMART client 5276.
    [16:06:40:305] [Reflection] [Fatal] Failed to detect or load OSRS.
    [16:06:40:318] [Reflection] [Status] All cached references free'd from memory
    Successfully executed.
    Here is what my script looks like, I'm only attempting to make a successful login..

    Code:
    program new;
    {$DEFINE Smart}
    {$I Reflection/Reflection.simba}
    
    const
    
      UserName := '';
      PassWord := '';
    
    
      {**************
       Fishing Types:
        0 - Cage
        1 - Net
        2 - Harpoon
        3 - Bait
      **************}
      F_TYPE := 0;
    
    var
      xp, xpPerHour, sBreak, bBreak, startLvl, endLvl, x, y: Integer;
      lPlayer: TReflectLocalPlayer;
      Mouse: TReflectionMouse;
      CheckTimer: TReflectTimer;
      MyLogger: TReflectLogger;
      TotalTime: TReflectTimer;
    
    
    procedure Init;
    
    begin
      lPlayer.Username := UserName;
      lPlayer.Password := PassWord;
      Reflect.MouseSpeed := 40;
      lPlayer.Active := True;
      Reflect.Setup;
      lPlayer.Login;
      ClearDebug;
      MyLogger.Init('Catherby Fisherman');
      startLvl := lPlayer.GetSkillLevel(Skill_Fishing);
      TotalTime.Start;
      WriteLn('IGN: ' + lPlayer.GetName);
      WriteLn('Fishing Level: ' + ToStr(startLvl));
    
    end;
    
    begin
      Init;
    end.
    Any help would be greatly appreciated, I'm ready to start making some useful scripts!

  2. #2
    Join Date
    Apr 2016
    Location
    New Zealand
    Posts
    76
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    The first thing you need to do is use Refect.Setup before anything else.

    It may also be a problem with your Java path, but try rearranging the code first.

  3. #3
    Join Date
    May 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I moved my Reflect.Setup call and it hasn't changed anything. Checking Javapath now.

  4. #4
    Join Date
    May 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I've checked to find the location of my jre, it's stored in the default c:\Program Files\Java\ path, I also checked my system environment variables and noticed I couldn't find a reference to my javapath anywhere. It seems weird that I was able to use java -version to get the java version from the command prompt if it wasn't in my env variables. And after doing that it is still throwing the same error.

  5. #5
    Join Date
    May 2013
    Posts
    75
    Mentioned
    3 Post(s)
    Quoted
    48 Post(s)

    Default

    Have you fixed this yet or you still need help?

  6. #6
    Join Date
    Jan 2015
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I need help with this lol

  7. #7
    Join Date
    Mar 2012
    Posts
    126
    Mentioned
    4 Post(s)
    Quoted
    20 Post(s)

    Default

    Quote Originally Posted by caseythegreatest View Post
    I need help with this lol
    Please make a new post and don't necro old threads. Also, be more specific than "this". Show screenshots or copy and paste the error.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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