# Thread: Reflection failed to detect OSRS?

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

## 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

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

{**************
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
Reflect.MouseSpeed := 40;
lPlayer.Active := True;
Reflect.Setup;
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. 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. Registered User
Join Date
May 2016
Posts
5
Mentioned
0 Post(s)
Quoted
0 Post(s)
I moved my Reflect.Setup call and it hasn't changed anything. Checking Javapath now.

4. Registered User
Join Date
May 2016
Posts
5
Mentioned
0 Post(s)
Quoted
0 Post(s)
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. SRL Junior Member
Join Date
May 2013
Posts
75
Mentioned
3 Post(s)
Quoted
48 Post(s)
Have you fixed this yet or you still need help?

6. Registered User
Join Date
Jan 2015
Posts
4
Mentioned
0 Post(s)
Quoted
1 Post(s)
I need help with this lol

7. SRL Junior Member
Join Date
Mar 2012
Posts
126
Mentioned
4 Post(s)
Quoted
20 Post(s)
Originally Posted by caseythegreatest
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.