03-29-2012, 04:16 AM
Revision 440 should no longer crash with your plugin. However, the plugin does not work either.
These are the most important things you should change
After that try to fix the errors you get, should be really easy to do
These are the most important things you should change
Code:
...
local CuboidPlusPlugin = {} // delete this
CuboidPlusPlugin.__index = CuboidPlusPlugin // delete this
...
function CuboidPlusPlugin:new() // Delete all this
local t = {}
setmetatable(t, CuboidPlusPlugin)
local w = Lua__cPlugin:new()
tolua.setpeer(w, t)
w:tolua__set_instance(w)
return w
end
...
function Initialize() // Change to
function Initialize( Plugin ) // this
...
function CuboidPlusPlugin:OnPlayerJoin( Player ) // Change to
function OnPlayerJoin( Player ) // this
...
function CuboidPlusPlugin:OnBlockPlace( PacketData, Player ) // Change to
function OnBlockPlace( PacketData, Player ) // this
...
function CuboidPlusPlugin:OnBlockDig( PacketData, Player ) // Change to
function OnBlockDig( PacketData, Player ) // this
...
Plugin = CuboidPlusPlugin:new() // Delete these 3 lines
cRoot:Get():GetPluginManager():AddPlugin( Plugin )
cRoot:Get():GetServer():SendMessage("CuboidPlus Reloaded.")
After that try to fix the errors you get, should be really easy to do