PDA

View Full Version : General Tips.



King
01-07-2014, 07:10 PM
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


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
01-07-2014, 09:49 PM
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
01-07-2014, 10:04 PM
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
01-07-2014, 10:10 PM
haha I fail hardcore at commenting my code... oops. DON'T JUDGE ME

I only do sometimes XD

Hoodz
01-07-2014, 10:15 PM
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
01-07-2014, 11:00 PM
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!