Bad bug:
Code: Select all
2017-06-03 16:37:37: ACTION[Server]: krokoschlange right-clicks object 2978: LuaEntitySAO at (534,26.5,506)
2017-06-03 16:37:37: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'vehicles' in callback luaentity_Step(): /home/fabian/.minetest/mods/vehicles/api.lua:190: attempt to perform arithmetic on global 'timer' (a userdata value)
2017-06-03 16:37:37: ERROR[Main]: stack traceback:
2017-06-03 16:37:37: ERROR[Main]: /home/fabian/.minetest/mods/vehicles/api.lua:190: in function 'object_drive'
2017-06-03 16:37:37: ERROR[Main]: /home/fabian/.minetest/mods/vehicles/api.lua:803: in function </home/fabian/.minetest/mods/vehicles/api.lua:801>
2017-06-03 16:37:37: ERROR[Main]: (tail call): ?
You are able to enter and leave the car, steer and even drive backwards but when you press [W] it crashes
EDIT: only happens in a certain region of the map
EDIT: seems it only happens when you are near to these blinking lights from streets 2.0.1:
EDIT: thats why (I think): the blinking light also uses a global variable called timer
Code: Select all
-- Blinking Light
minetest.register_node("streets:roadwork_blinking_light_off", {
description = "Blinking Light",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = { "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_off.png" },
sunlight_propagates = true,
groups = { cracky = 1 },
node_box = {
type = "fixed",
fixed = {
{ -0.1875, -0.5, -0.125, 0.1875, -0.3125, 0.125 }, -- Base
{ -0.1875, -0.3125, 0, 0.1875, 0.0625, 0 }, -- Light
}
},
on_timer = function(pos, elapsed)
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_on", param2 = minetest.get_node(pos).param2 })
end,
on_construct = function(pos)
LOOK HERE >>> timer = minetest.get_node_timer(pos)
LOOK HERE >>> timer:start(1)
end,
})
minetest.register_node("streets:roadwork_blinking_light_on", {
description = "Blinking Light",
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = { "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_top.png", "streets_roadwork_blinking_light_on.png" },
sunlight_propagates = true,
groups = { cracky = 1, not_in_creative_inventory = 1 },
node_box = {
type = "fixed",
fixed = {
{ -0.1875, -0.5, -0.125, 0.1875, -0.3125, 0.125 }, -- Base
{ -0.1875, -0.3125, 0, 0.1875, 0.0625, 0 }, -- Light
}
},
light_source = 12,
on_timer = function(pos, elapsed)
minetest.set_node(pos, { name = "streets:roadwork_blinking_light_off", param2 = minetest.get_node(pos).param2 })
end,
on_construct = function(pos)
LOOK HERE >>> timer = minetest.get_node_timer(pos)
LOOK HERE >>> timer:start(1)
end,
drop = "streets:roadwork_blinking_light_off",
})