17:40:34: ERROR[main]: ========== ERROR FROM LUA ===========
17:40:34: ERROR[main]: Failed to load and run script from
17:40:34: ERROR[main]: /home/stefan/minetest/bin/../mods/minetest/carts/init.lua:
17:40:34: ERROR[main]: ...fan/minetest/bin/../mods/minetest/carts/mesecons.lua:2: attempt to index global 'mesecon' (a nil value)
17:40:34: ERROR[main]: stack traceback:
17:40:34: ERROR[main]: ...fan/minetest/bin/../mods/minetest/carts/mesecons.lua:2: in main chunk
17:40:34: ERROR[main]: [C]: in function 'dofile'
17:40:34: ERROR[main]: .../stefan/minetest/bin/../mods/minetest/carts/init.lua:731: in main chunk
17:40:34: ERROR[main]: =======END OF ERROR FROM LUA ========
sfan5 wrote:The latest Version doesn't work for me:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
17:40:34: ERROR[main]: ========== ERROR FROM LUA ===========
17:40:34: ERROR[main]: Failed to load and run script from
17:40:34: ERROR[main]: /home/stefan/minetest/bin/../mods/minetest/carts/init.lua:
17:40:34: ERROR[main]: ...fan/minetest/bin/../mods/minetest/carts/mesecons.lua:2: attempt to index global 'mesecon' (a nil value)
17:40:34: ERROR[main]: stack traceback:
17:40:34: ERROR[main]: ...fan/minetest/bin/../mods/minetest/carts/mesecons.lua:2: in main chunk
17:40:34: ERROR[main]: [C]: in function 'dofile'
17:40:34: ERROR[main]: .../stefan/minetest/bin/../mods/minetest/carts/init.lua:731: in main chunk
17:40:34: ERROR[main]: =======END OF ERROR FROM LUA ========
Do you have latest mesecons installed. If it still dont work try it without mesecons and it will work.
tee-jay wrote:I have the latest mesecons version from github (7568182) and have the exact same problem sfan5 has.
Yes it does work without mesecons.
mauvebic wrote:Suggestion: turn your cart declarations into functions so people can setup carts with different textures, possibly even nodeboxes :-)
Ragnarok wrote:I created fully synthetic simple loco sound. What do you think?
http://speedy.sh/mUvnk/loco-syntetic.wav
License: WTFPL
jin_xi wrote:hey pilz adam
really nice work. i had this idea: FAHRPLAN! would it make sense to be able to put a timetable next to a track so that a train would run automatically? like some simple format for times and "stations" (other such tables)?
graphics boy wrote:When I add the cart then rightclick on it I get this:
ServerError: Lua: error running 'on_rightclick':
...v-20120606-win32\bin\..\mods\minetest\carts\init.Lua:390: attemp to call method 'is_player' (a nil value)
can somebody help?
PilzAdam wrote:tee-jay wrote:I have the latest mesecons version from github (7568182) and have the exact same problem sfan5 has.
Yes it does work without mesecons.
Maybe it helps when you add "mesecons" to depends.txt
When this dont fix it I have no idea what to do. I dont have this bug.
Tggtt wrote:I had that problem too and adding mesecons to depends.txt of carts fixed it.
It's working great, thank you very much.
Tggtt wrote:Also, does it have a box that the cart takes its contents too? I only find one that the cart drops the content, not for taking.
If it's possible, I would be able to create closed circuit tracks that carts take contents from one side and drop on the other.
PilzAdam wrote:tee-jay wrote:I have the latest mesecons version from github (7568182) and have the exact same problem sfan5 has.
Yes it does work without mesecons.
Maybe it helps when you add "mesecons" to depends.txt
When this dont fix it I have no idea what to do. I dont have this bug.
--search for pickup plates and take items
-- and
-- search for boxes and place all items (except players) in it
for x=-1,1 do
local pos = {x=self.object:getpos().x+x, y=self.object:getpos().y, z=self.object:getpos().z}
local name = minetest.env:get_node(pos).name
if name == "carts:pickup_plate" then
pos.x = math.floor(0.5+pos.x)
pos.y = math.floor(0.5+pos.y)
pos.z = math.floor(0.5+pos.z)
local items = minetest.env:get_objects_inside_radius(pos, 1)
for i,item in ipairs(items) do
if not item:is_player() then
table.insert(self.items, item)
elseif TRANSPORT_PLAYER then
table.insert(self.items, item)
end
end
end
if name == "carts:chest" and self.items ~= {} then
local items_tmp = {}
for i,item in ipairs(self.items) do
if not item:is_player() then
item:setpos({x=math.floor(0.5+pos.x), y=math.floor(0.5+pos.y)+0.2,
z=math.floor(0.5+pos.z)})
else
table.insert(items_tmp, item)
end
end
self.items = items_tmp
end
end
for z=-1,1 do
local pos = {x=self.object:getpos().x, y=self.object:getpos().y, z=self.object:getpos().z+z}
local name = minetest.env:get_node(pos).name
if name == "carts:pickup_plate" then
pos.x = math.floor(0.5+pos.x)
pos.y = math.floor(0.5+pos.y)
pos.z = math.floor(0.5+pos.z)
local items = minetest.env:get_objects_inside_radius(pos, 1)
for i,item in ipairs(items) do
if not item:is_player() then
table.insert(self.items, item)
elseif TRANSPORT_PLAYER then
table.insert(self.items, item)
end
end
end
if name == "carts:chest" and self.items ~= {} then
local items_tmp = {}
for i,item in ipairs(self.items) do
if not item:is_player() then
item:setpos({x=math.floor(0.5+pos.x), y=math.floor(0.5+pos.y)+0.2,
z=math.floor(0.5+pos.z)})
else
table.insert(items_tmp, item)
end
end
self.items = items_tmp
end
end
-- downhill
local vel = self.object:getvelocity()
vel.y = -3*MAX_SPEED -- used to be -2*MAX_SPEED
Users browsing this forum: No registered users and 46 guests