SRL Archive - RS3 Help

General Tips.


King

2014-01-07 14:10:47

SRL Quick Tips

Saw this from another user's post, thought it would be useful. So until the Wiki is back up, we can post them here. This is a place to post all small tips / suggestions that have to do with SRL programming in general, all levels welcome.




Format


From: King
Tip: Add small explanations above your procedures and functions.

Explanation: Makes the code easier to read, gives the reader the ability to see what you are trying to accomplish.

Foundry

2014-01-07 16:49:36

Tip: Always add failsafes to procedures that wait for something to occur.

Explanation: Adding a timeout period for functions that wait for an event to happen allows the script to recover if the event never appears or if there is a problem detecting it. Exiting after a time limit has been reached avoids eternal waits and repetitive mouse movement.

Ashaman88

2014-01-07 17:04:43

From: King
SRL Quick Tips

Saw this from another user's post, thought it would be useful. So until the Wiki is back up, we can post them here. This is a place to post all small tips / suggestions that have to do with SRL programming in general, all levels welcome.




Format


haha I fail hardcore at commenting my code… oops. DON'T JUDGE ME

King

2014-01-07 17:10:31

From: Ashaman88
haha I fail hardcore at commenting my code… oops. DON'T JUDGE ME


I only do sometimes XD

Hoodz

2014-01-07 17:15:52

Tip: if you found a bug in a script, please give as much information as possible!

Explanation: add simba debug log, make screenshots or a video, explain as good as possible what happens so it's easier for the script writer to fix the problem!

edit: @King are you going to add all the tips in the first post so that nobody has to scroll trough the posts?

King

2014-01-07 18:00:56

From: hoodz
Tip: if you found a bug in a script, please give as much information as possible!

Explanation: add simba debug log, make screenshots or a video, explain as good as possible what happens so it's easier for the script writer to fix the problem!

edit: @King are you going to add all the tips in the first post so that nobody has to scroll trough the posts?

I can do that!