But since a lot of people -aren't- on IRC, I thought it would be wise to mention some thoughts we ended up thinking was The Way To Do Stuff.
As you should know from the manual, Mudlet doesn't have "namespaces"-- every script that you run, be it a script-script, or some lua code in a trigger or alias, shares a single global context. This makes certain things really easy, but also starts tripping people up a little if we start using systems from more then one person.
There's a lot of talk going on about shared / external modules, which is likely to be implemented in some form in the future -- which will make it a lot easier for you to pick and choose stuff which people release and integrate it into your profiles. You can already do that, but it'll be easier. So people are likely to do it more.

With that in mind, anyone writing code now may want to take a little bit of time to "future-proof" your code by adopting some strict naming conventions - that being, instead of using <name>, use <module>.<name>. You'll be putting your module-specific variables into a table.
This requires a little bit of setup, which I place in the main group of my package, which we'll assume I'm using a prefix of 'package' for:
Code: Select all
package = package or {}
Code: Select all
package.health = matches[2]
Code: Select all
function package:do_my_thing()
echo("Hi.")
end
Me, I'm going to end up using "<system>.variable" for all the stuff I do which is intended for this monstrosity of a system I'm working on that I so haven't named, and then "ixokai.variable" for one-off's that I might have that are just generally useful.
This isn't a requirement, just a recommendation. If you do it early, you won't have any trouble running your code with other peoples -- well, you'll have less trouble at least.
HTH,
--Ix