Don't click here unless you want to be banned.

LSL Wiki : LSL101Appendix

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
<Int - Fo - Ch1 - Ch2 - Ch3 - Ch4 - Ch5 - Ch6 - App 1 - App2>

Appendix 1: Do's and Don't's of Scripting

A mind is a terrible thing to waste...

Adapted from this thread, here's something extra that others found useful.


1) Learn from others' scripts available for free.
Available on the Scripting Library and Wiki, as well as countless places in-world, these examples are the necessary first step to cracking into LSL.

2) Ask questions often, here, on the forums, and in-world.
For many people, this is the only way to learn effectively. There's no shame in not knowing how to do something.

3) Try to do new things with old commands.
Test the limits of the commands you come across. Notice any patterns, nuances, and bugs that may occur.

4) Use states and personal functions when tasks are repeated often.
Doing so greatly reduces the volume (and frustration) of code you must write.

5) There is no shame in Trial and Error; use it.
We all make mistakes. I've been known to spend several days to tackle very simple problems at times, and people seem to have a high regard for my abilities. We're all human.

6) Use multiple scripts as needed.
That's what they're there for. If you run out of room or usefulness in one script, start a second. Don't be afraid.

7) Read the context-based help.
One of the best-kept secrets of LSL is also its simplest. By highlighting any command typed in properly, you can see a tooltip on its syntax and usage. As for figuring out how it's spelled? Try this Wiki. Or use the box on the lower left corner of the script editor.

8) Set realistic goals for yourself.
Achieve them by accomplishing real tasks. Say to yourself: "I want to make this really cool killer app in Second Life" and strive to create it. Make these goals realistic.

9) Work smarter, Not harder.
Once you have a fair deal of coding experience under your belt, ask yourself how something might be done better - even if it's been done before. Working smarter means servers are happier; working harder means the reverse.

10) Code, Code, Code
Nothing beats experience. Get out there and do something.


1) Don't push yourself too hard.
It's easy to get frustrated if you cannot tackle a problem. There's a fine line between creation and obsession. Know your limits, and strive to extend them at a realistic pace.

2) Don't use stuff that you know is harmful. If you have to use it, be polite:
A lot of the complaints filed on the boards and in Second Life stem from people failing to use simple common sense. Anyone can be better than this if they're willing to try to do so. Will you?

3) Don't expect LSL to have a neat solution for everything:
LSL is a language created to give us tools, not necessarily solve all common problems in a nice, neat package. Because a task does not have an LL function does not mean it cannot be done. It also does not mean the Lindens should "just add it." It means you should take a whack at it first.

4) Don't expect functions to do exactly what you want all of the time:
Learning is in order. LSL is half bending LSL to your will, half bending to fit its design. The same can be said of any coding language.

5) Don't overuse dynamics and community functions:
Set reasonable limits on physics, push, and player-related functions. Physics is the single-most laggy ability of Second Life, second only to poor scripting. Abuse of messages and ban scripts are the single most annoying part of Second Life.

6) Don't get carried away:
Just because you can do something doesn't mean you should. Always weigh in the possible benefits and concerns of scripts you write. The community can be less then accepting at times; keep them mind.

7) Don't abuse some functions:
A few listeners, a few sensor loops, and a few timers are all okay; Second Life was built to handle these. A couple hundred in an object are not okay. A couple hundred objects with a few of these are not okay. If confronted with this problem, think it through prior to working on it.

8) Don't expect to know everything:
I use the Wiki extensively for reference. Keep good notes, and refer to them often if you're forgetful.

9) Don't delete something when you're done:
Save a copy! It might prove useful later. If you think the community might be interested, post it to a public script library.

10) Don't use scripting to plot World Domination:
Unless you want to find me waiting with my Nerf Bat. ;)

<Int - Fo - Ch1 - Ch2 - Ch3 - Ch4 - Ch5 - Ch6 - App 1 - App2>

Homepage | LSL101 | Tutorial | CrashCourse | Glossary
There is no comment on this page. [Display comments/form]