I'm just getting started learning Lua -- still at the "Hello World" stage -- but I've run into a problem that makes testing difficult. I can't figure out how to unload my plugin so that I can load a new version for testing.
When I type '/plugins unload HelloWorld', I get the error message 'Plugin script state "HelloWorld" could not be unloaded.' I have an apartment specified in my .plugin file, which I thought would take care of the problem, but still no joy.
<Description>Learning LOTRO Lua scripting.</Description>
<Configuration Apartment="DagsPlace" />
The code isn't doing anything fancy, just opening 3 windows with some text in them. It's taken pretty much verbatim from Garan's excellent tutorial.
if x==nil or y==nil then
-- override the built in SetPosition, adding a simple output statement.
self.SetPosition=function(sender, left, top)
Turbine.UI.Window.SetPosition(self, left, top); -- pass the args on to the base class built in function
Turbine.Shell.WriteLine("You positioned this instance at ("..tostring(left)..","..tostring(top)..")");
-- perform some additional code here
self:SetText("Hello World Window");
If someone could point me in the right direction, I'd really appreciate it. Thanks!