-
Notifications
You must be signed in to change notification settings - Fork 4
Pitfalls
JasXSL edited this page Nov 29, 2017
·
3 revisions
| Don't | If | Explanation |
|---|---|---|
| llMessageLinked with a non-0 int | Ever | You can use llMessageLinked(x, 0, y, z), but negative and positive channels are usually reserved for runMethod. Use an input definition in the class header file instead, and call that method with runMethod instead. |
| Forget to define a PC_SALT and TOKEN_SALT | When using listeners | Otherwise your code might be vulnerable to injections |
| Create a global var named _TIMERS | When using multiTimer | _TIMERS is a reserved global list |
| Forget to wrap list, vector, rotation definitions in parentheses | When calling macros | The preprocessor will throw a fit. Use (<x,y,z>) (["X","Y"]) |
| Forget to end a .lsl file without a newline | Ever | You'll get preprocessor errors |
| Stack heap | Writing bad code | See LSL Memory Best Practices |