PDA

View Full Version : Reflection failed to detect OSRS?



dl_bit
06-12-2016, 09:29 PM
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:


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


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!

Dissimulo
06-12-2016, 09:58 PM
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.

dl_bit
06-12-2016, 10:16 PM
I moved my Reflect.Setup call and it hasn't changed anything. Checking Javapath now.

dl_bit
06-12-2016, 10:20 PM
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.

MariusK
06-16-2016, 10:48 AM
Have you fixed this yet or you still need help?

caseythegreatest
01-27-2017, 07:33 AM
I need help with this lol

Raiden702
01-27-2017, 09:26 AM
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.