MrThebuilder3 wrote:for me it says ..\data\mods\animals\init.lua:1227: attempt to call field 'get_modpath' (a nil value)
Hackeridze wrote:MrThebuilder3 wrote:for me it says ..\data\mods\animals\init.lua:1227: attempt to call field 'get_modpath' (a nil value)
For ME the answer was to [re]compile newest minetest from github.
minetest.register_entity(":animals:sheep",
{
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "sprite",
visual_size = {x=4,y=4},
textures = {"wieldhand.png"},
spritediv = {x=6,y=1},
initial_sprite_basepos = {x=0, y=0},
on_step = function(self, dtime)
self.object:remove()
end,
on_punch = function(self, hitter) end,
on_rightclick = function(self, clicker) end,
on_activate = function(self,staticdata) end,
}
)
minetest.register_entity(":animals:sheep_naked",
{
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "sprite",
visual_size = {x=4,y=4},
textures = {"wieldhand.png"},
spritediv = {x=6,y=1},
initial_sprite_basepos = {x=0, y=0},
on_step = function(self, dtime)
self.object:remove()
end,
on_punch = function(self, hitter) end,
on_rightclick = function(self, clicker) end,
on_activate = function(self,staticdata) end,
}
)
minetest.register_entity(":animals:deer",
{
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "sprite",
visual_size = {x=4,y=4},
textures = {"wieldhand.png"},
spritediv = {x=6,y=1},
initial_sprite_basepos = {x=0, y=0},
on_step = function(self, dtime)
self.object:remove()
end,
on_punch = function(self, hitter) end,
on_rightclick = function(self, clicker) end,
on_activate = function(self,staticdata) end,
}
)
minetest.register_entity(":animals:cow",
{
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "sprite",
visual_size = {x=4,y=4},
textures = {"wieldhand.png"},
spritediv = {x=6,y=1},
initial_sprite_basepos = {x=0, y=0},
on_step = function(self, dtime)
self.object:remove()
end,
on_punch = function(self, hitter) end,
on_rightclick = function(self, clicker) end,
on_activate = function(self,staticdata) end,
}
)
minetest.register_entity(":animals:big_red",
{
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},
visual = "sprite",
visual_size = {x=4,y=4},
textures = {"wieldhand.png"},
spritediv = {x=6,y=1},
initial_sprite_basepos = {x=0, y=0},
on_step = function(self, dtime)
self.object:remove()
end,
on_punch = function(self, hitter) end,
on_rightclick = function(self, clicker) end,
on_activate = function(self,staticdata) end,
}
)
sapier wrote:@temperest although I'd prefere people not to remove animals mod I'm going to add your idea to my mod if you don't mind ;-)
rinoux wrote:this is my first attempt...
12:31:22: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error running function 'on_step': ...obin/modserver/bin/../data/mods/animals/fighting.lua:255: attempt to compare number
with nil
12:31:22: ERROR[ServerThread]: stack traceback:
In thread 7f404bfff700:
/home/robin/modbase/minetest/src/server.cpp:115: virtual void* ServerThread::Thread(): Assertion '0'
failed.
Debug stacks:
DEBUG STACK FOR THREAD 7f404bfff700:
#0 virtual void* ServerThread::Thread()
(Leftover data: #1 void Server::AsyncRunStep())
(Leftover data: #2 virtual void ServerEnvironment::step(float))
(Leftover data: #3 void RemoteClient::GetNextBlocks(Server*, float, irr::core::array<PrioritySortedB
lockTransfer, irr::core::irrAllocator<PrioritySortedBlockTransfer> >&))
(Leftover data: #4 void BlockEmergeQueue::addBlock(irr::u16, v3s16, irr::u8))
DEBUG STACK FOR THREAD 7f4051fb5720:
#0 int main(int, char**)
#1 void dedicated_server_loop(Server&, bool&)
(Leftover data: #2 void Server::step(float))
Aborted
Users browsing this forum: No registered users and 20 guests