Forums » Community Projects

Sample addons

Jul 07, 2007 raybondo link
This is a sample addon that shows the extreme basics of making an addon.

http://www.ratelis.com/reload.zip

It auto-reloads and auto-repairs your active ship when you dock.
It always tries to do it, even if it doesn't need to or you can't afford it.
Jul 07, 2007 mr_spuck link
you forgot a dash in the comment at the top. :P
the event handling is exactly how I did it .. that's cool!

an addon can define variables without declare?
Jul 07, 2007 raybondo link
they can in the global section. They cannot inside a function, that is where you need the declare function.
The declare() stuff is just a debugging tool to show when you forget to define local variables as local or misspell variables inside functions.

Oh and I fixed the dash in the comment, thanks.
Jul 08, 2007 Scuba Steve 9.0 link
Oh, that's how you use RegisterEvent. Cool.