05-10-2015, 12:10 PM
(This post was last modified: 05-10-2015, 12:13 PM by Shadowraix.)
It should create it on the initialize function,but all of my commands are unknown.
All of my command functions return true.
Quote:function Initialize(Plugin)
Plugin:SetName("AutomatedMessages")
Plugin:SetVersion(1)
local PluginManager = cPluginManager:Get()
PluginManager:BindCommand("/automessage add","automessage.add",AddMessage,"")
PluginManager:BindCommand("/automessage remove","automessage.remove",RemoveMessage,"")
PluginManager:BindCommand("/automessage edit","automessage.edit",EditMessage,"")
PluginManager:BindCommand("/automessage reload","automessage.reload",Reload,"")
PluginManager:BindCommand("/automessage interval","automessage.interval",EditInterval,"")
local MsgDB = sqlite3.open("AutomatedMessages.sqlite")
MsgDB:exec([=[
CREATE TABLE IF NOT EXISTS Messages
(
MessageName TEXT Primary Key NOT NULL,
Message TEXT NOT NULL,
Interval INT NOT NULL
);
]=])
Reload()
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
return true
end
All of my command functions return true.