08-15-2013, 01:17 PM
Hello, I'm new to lua and I've started created plugins for a new server that I will be helping with, I made my first plugin and it was working fine until I went to go add the permissions, I looked at the file for the permissions then restarted the server, the console then gave my the following error:
Here is the code (main.lua):
Since the errors are in the main.lua I don't think that the other lua would effect it (correct me if I'm wrong)
Any help would be greatly appreciated, if possible, an explanation would be nice but if there is none that is fine
Code:
LUA: 2 - Plugins/SeaCustom/main.lua:10: "BindCommand" function expects a function as its 3rd parameter. Command-binding aborted.
Error in plugin SeaCustom calling function Initialize()
Error in plugin SeaCustom: Cannot call the Initialize() function. Plugin is temporarily disabled.
cLuaState::Close: Trying to close an invalid LuaState, ignoring.
Here is the code (main.lua):
Code:
PLUGIN = {}
--Commands
function Initialize( Plugin )
PLUGIN = Plugin
Plugin:SetName( "SeaCustom" )
Plugin:SetVersion( 0.1 )
PluginManager = cRoot:Get():GetPluginManager()
PluginManager:BindCommand("/heal", "SeaCustom.heal", HandleHealCommand, " ~ Heal yourself!")
PluginManager:BindCommand("/killstats", "SeaCustom.killstats", HandleKillStatsCommand, " - Lose the game!")
return true
end
Any help would be greatly appreciated, if possible, an explanation would be nice but if there is none that is fine