SRL Archive - Bugs

I am converting a scar script to Simba.


Alien Technology

2011-02-06 12:58:54

I wanted to try the [SRL4][Reflection] Rimmington AnyThing Miner script at http://villavu.com/forum/showthread.php?t=36160.

I downloaded the attachment with the following hyperlink: Rimmington Miner 0.61.scar (43.6 KB, 168 views)

I don't use scar. I use Simba. So, I followed the instructions in the SRL Wiki at http://villavu.com/wiki/Make_your_Scar_script_work_in_Simba entitled Make your Scar script work in Simba.

I changed these 3 lines by replacing .include with $i.

{$i SRL\SRL\Misc\Smart.Scar}
{$i SRL\SRL.Scar}
{$i Reflection/Reflection.simba}

I ran it.

The results are:

[Hint] C:\Documents and Settings\Parent\My Documents\Downloads\Simba.i386-win32.2010-12-01_21_12\Includes\SRL/SRL/core/antirandoms/forester.scar(329:3): Variable 'I' never used at line 328
[Hint] C:\Documents and Settings\Parent\My Documents\Downloads\Simba.i386-win32.2010-12-01_21_12\Includes\SRL/SRL/core/antirandoms/forester.scar(329:3): Variable 'CTS' never used at line 328
[Hint] C:\Documents and Settings\Parent\My Documents\Downloads\Simba.i386-win32.2010-12-01_21_12\Includes\SRL/SRL/core/antirandoms/forester.scar(330:3): Variable 'P' never used at line 329
[Hint] C:\Documents and Settings\Parent\My Documents\Downloads\Simba.i386-win32.2010-12-01_21_12\Includes\SRL/SRL/core/antirandoms/forester.scar(331:3): Variable 'OBJS' never used at line 330
[Hint] C:\Documents and Settings\Parent\My Documents\Downloads\Simba.i386-win32.2010-12-01_21_12\Includes\SRL/SRL/core/antirandoms/forester.scar(332:3): Variable 'DONE' never used at line 331
[Error] (149:10): Duplicate identifier 'WALKPATH' at line 148
Compiling failed.

Does anyone have any suggestions?

**BANNED The Man

2011-02-06 13:02:26

Change that to WalkPathX
And everything that calls WALKPATH

3Garrett3

2011-02-06 13:03:28

This script will need an additional upgrade from the old reflection include to the new include. It is likely a little too old to work without a bit of maintenance. It would be a good project to help you learn scripting, but you will need to know a bit about reflection as well as how the script (this individual script) works, because every coder uses a bit of different logic.

Alien Technology

2011-02-06 13:26:42

From: Dynamite
Change that to WalkPathX
And everything that calls WALKPATH


Thanks for the quick reply, Dynamite.

Am I correct in saying that there is a WalkPath function in one of the includes and there is also a WalkPath function in the body of the program, so the compiler detects a duplicate name?

3Garrett3

2011-02-06 13:32:29

From: Alien Technology
Thanks for the quick reply, Dynamite.

Am I correct in saying that there is a WalkPath function in one of the includes and there is also a WalkPath function in the body of the program, so the compiler detects a duplicate name?


Yes, there is a WalkPath in reflection now, which is why there is a duplicate identifier.

The idea that Dynamite gave may help, but the script is likely to have performance errors (maybe even more errors of duplicates) which you will need to sort out.

Good luck!

Alien Technology

2011-02-06 13:37:36

From: 3Garrett3
This script will need an additional upgrade from the old reflection include to the new include. It is likely a little too old to work without a bit of maintenance. It would be a good project to help you learn scripting, but you will need to know a bit about reflection as well as how the script (this individual script) works, because every coder uses a bit of different logic.


Thanks for the quick reply, 3Garrett3.

I neglected to say that I changed {.Include SRL/SRL/Reflection/reflection.Scar} to {$i Reflection/Reflection.simba}.

Is that what you meant when you said "upgrade from the old reflection include to the new include"?

3Garrett3

2011-02-06 13:43:22

From: Alien Technology
Thanks for the quick reply, 3Garrett3.

I neglected to say that I changed {.Include SRL/SRL/Reflection/reflection.Scar} to {$i Reflection/Reflection.simba}.

Is that what you meant when you said "upgrade from the old reflection include to the new include"?


Well, not exactly.

What you've done is included reflection (the new way). What I was talking about is that the script you are upgrading is what I am referring to as an 'Old Reflection' type script. It was made in the early stages of reflection (2.5 years ago). This was before the large update by Jagex which killed reflection for almost a year. Since then, there have been a large amount of updates which will act differently than NoIdea had imagined when he created the script. You will find that if you get the script to run, there will still be a few things that you'll need to change in order for the script to run, simply because it is so old and there have been so many changes to SRL and Reflection since then.

However, keep this thread updated with your progress. There are many helpful people on SRL who would love to help you learn to script and see you develop to the level of creating scripts by yourself.

Alien Technology

2011-02-06 13:55:55

Thank you again, 3Garrett3.

Your explanations are lucid.

Your encouragement is appreciated.

Alien Technology

2011-02-07 10:19:36

From: 3Garrett3
There are many helpful people on SRL who would love to help you learn to script and see you develop to the level of creating scripts by yourself.


I am currently reading New Reflection Tutorial (up to date as of Dec 1, 2010) at http://villavu.com/forum/showthread.php?t=59400.

Here is a quote from the tutorial: "Learn how to code for reflection all right here!"

Alien Technology

2011-02-07 10:57:23

Here is a quote from the tutorial:

"Update log:
UPDATE: Nov 28th (Editior's note: I assume November 28, 2010.)
I just committed a ton of new features for interfaces, don't bother using the ones I added in this guide."

I gather that this means that the section entitled Interfaces: A difficult topic made simple should be ignored and I should try to find a more up–to–date tutorial regarding this aspect of Reflection.

3Garrett3

2011-02-07 11:34:11

From: Alien Technology
Here is a quote from the tutorial:

"Update log:
UPDATE: Nov 28th (Editior's note: I assume November 28, 2010.)
I just committed a ton of new features for interfaces, don't bother using the ones I added in this guide."

I gather that this means that the section entitled Interfaces: A difficult topic made simple should be ignored and I should try to find a more up–to–date tutorial regarding this aspect of Reflection.


From what I know about interfaces is that they aren't really extremely useful for scripting anyway. Colour methods are much more reliable and efficient in finding the interface and clicking it.

Alien Technology

2011-02-07 12:07:51

From: 3Garrett3
Colour methods are much more reliable and efficient in finding the interface and clicking it.


When SRL script writers refer to color methods, are those considered a part of the realm of programming using Reflection or are they in a separate category?

**BANNED The Man

2011-02-07 12:56:57

From: Alien Technology
When SRL script writers refer to color methods, are those considered a part of the realm of programming using Reflection or are they in a separate category?


SRL has 2 includes.
1 is the Color include and
1 is the Reflection include.
You can use each separately or both together.
They each have their weaknesses and strengths.

TL;DR
Color is completely separate to Reflection but can be used with it.

-Boom

Alien Technology

2011-02-07 12:59:34

Thank you for the clarification, Dynamite.

i luffs yeww

2011-02-07 14:14:41

SRL is a single include btw.

Alien Technology

2011-02-08 00:59:43

From: i luffs yeww
SRL is a single include btw.


Thank you for the additional detailed explanation, i luffs yeww.

I usually use the following includes:

[SIZE="3"][FONT="Times New Roman"]{$define SMART}  // This is how we include SMART; it HAS to be included BEFORE SRL!
{$i srl\srl.scar}
{$i reflection\reflection.simba}[/FONT][/SIZE]

I assume that the color procedures and functions are part of the SRL include.

i luffs yeww

2011-02-08 01:19:28

Yup. SMART simply holds the RuneScape applet to allow autoing without the use of the keyboard/mouse. SRL has all color functions, and reflection has.. reflection functions. :p

Simba itself also has a few hundred (between four and five hundred right now) functions that are used quite often, and are the backbone functions of SRL. :)

Reflection is a great include, albeit a little messy and under-developed right now, in my opinion, but it's always a good idea to have a color back up.

I'm babbling now.

Alien Technology

2011-02-08 09:51:17

From: i luffs yeww
…but it's always a good idea to have a color back up.


Thank you for the reply, i luffs yeww.

Yes, I have noticed that script writers that use the reflection approach seem reluctant to "cut the cord" to the color approach.