05-05-2014, 05:06 AM
Okay, tested that now under linux. Cloned source with git from github and compiled it without any problems.
Created a release version of the server. Added my plugin, started the server and joined the world. Then the console get spammed with this error.
If I try to start the debug version of the server, it stops with that error.
Here's the source of the plugin, do I make a very big mistake?
Created a release version of the server. Added my plugin, started the server and joined the world. Then the console get spammed with this error.
Code:
[20:51:23] UnboundedRelGetBlock: requesting a block with a_RelY out of range: -1If I try to start the debug version of the server, it stops with that error.
Code:
[7fe29337d740|20:58:34] Assertion failed: m_World == NULL, file /home/lukas/cpp/MCServer/src/LightingThread.cpp, line 93
MCServer_debug: /home/lukas/cpp/MCServer/src/LightingThread.cpp:93: bool cLightingThread::Start(cWorld*): Assertion `0' failed.
AbortedHere's the source of the plugin, do I make a very big mistake?
PLUGIN = nil
function Initialize(Plugin)
Plugin:SetName("TestPlugin")
Plugin:SetVersion(1)
PLUGIN = Plugin
LOG("Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
-- create the world
CreateWorld()
-- Hooks
cPluginManager:AddHook(cPluginManager.HOOK_CHUNK_GENERATING, AirGenerator)
-- Command Bindings
cPluginManager.BindCommand("/checkworld", "testplugin.checkworld", CheckWorld, " - Check if world exists")
cPluginManager.BindCommand("/teleportto", "testplugin.teleportto", TeleportTo, " - Teleport to world")
return true
end
function OnDisable()
LOG(PLUGIN:GetName() .. " is shutting down...")
end
function CheckWorld(Split, Player)
if (#Split ~=2) then
Player:SendMessage("Usage: /checkworld <worldname>")
return true
end
if (cRoot:Get():GetWorld(Split[2]) == Nil) then
Player:SendMessage("No world exists with that name.")
return true
end
Player:SendMessage("The world exists.")
return true
end
function TeleportTo(Split, Player)
if (#Split ~=2) then
Player:SendMessage("Usage: /teleportto <worldname>")
return true
end
if (cRoot:Get():GetWorld(Split[2]) == Nil) then
Player:SendMessage("No world exists with that name.")
return true
end
Player:MoveToWorld(Split[2])
Player:TeleportToCoords(0, 100, 0)
Player:SendMessage("Teleported you...")
return true
end
function CreateWorld()
cRoot:Get():CreateAndInitializeWorld("airworld")
end
function AirGenerator(a_World, a_ChunkX, a_ChunkZ, a_ChunkDesc)
if (a_World:GetName() == "airworld") then
FillBlocks(a_ChunkDesc)
end
end
function FillBlocks(a_ChunkDesc)
a_ChunkDesc:FillBlocks(E_BLOCK_AIR, 0)
a_ChunkDesc:FillRelCuboid(0, 15, 60, 60, 0, 15, E_BLOCK_STONE, 0) -- Fill 1 layer with stone, at height 60
a_ChunkDesc:SetUseDefaultBiomes(false)
a_ChunkDesc:SetUseDefaultHeight(false)
a_ChunkDesc:SetUseDefaultComposition(false)
a_ChunkDesc:SetUseDefaultFinish(false)
end

