Thread: Begginers Woe.
View Single Post
  #1  
Unread 08-23-2011, 07:32 AM
Elsee Elsee is offline
The Wary
 
Join Date: Aug 2011
Posts: 3
Begginers Woe.

Hi there wanna get started writing a plugin and i cant get this to work, and i cant understand why.

Main.Lua
Code:
-- Main.lua
import "Elsees.Elsees.HelloClass";

ElseesCommand = Tubine.ShellCommand();
Tubine.Shell.AddCommand("el", ElseesCommand);

HelloClass class = HelloClass();

function ElseesCommand:Execute(cmd, args)
	if(cmd == "sayhi") then
		class.SayHello();
	else
		Turbine.Shell.WriteLine("Invalid Command");
        end
end

Tubine.Shell.WriteLine("Elsee Plugin V0.1");
HelloClass.lua
Code:
-- HelloClass
import "Turbine.Utils";
HelloClass = class( );

function HelloClass:Constructor()
	self.SayHello();
end

function HelloClass:SayHello()
	Turbine.Shell.WriteLine("Hello World!");
end
I have the Turbine Files in my plugin folder, all i get is the error "Unable to load Plugins "Elsees"", which i dont understand. from what i have googled that error was/is caused by bad directory structure?

Code:
LOTRO / Plugins / Elsees / Elsees / luafiles
Reply With Quote