[SOLVED] Hi, It's been a year...........
Posted: Tue Sep 15, 2020 21:27
and my mod seems to be broken.
I have been more or less offline and unwired for almost a year. My brain has gone soft and slow. I hope people are still around and well.
For those that remember i built a Native American Village (for fun) you could even sleep in the tepee. but not any more.
I get this error message.
ModError: Failed to load and run script from /home/usr/.minetest/mods/Native-American-Village/init.lua:
....minetest/mods/Native-American-Village/indianvillage.lua:10: attempt to index global 'beds' (a nil value)
stack traceback:
....minetest/mods/Native-American-Village/indianvillage.lua:10: in main chunk
[C]: in function 'dofile'
...e/usr/.minetest/mods/Native-American-Village/init.lua:10: in main chunk
Check debug.txt for details.
I know this should be a simple solution but just can't see it. After 5 hours of reading I admit i need a little pointer to get me back on track.
Like i said soft brain after a year from IT.
Cheers
BTW this is on linux mint 20
INDIANVILLAGE.LUA
-- Copyright (C) 2019 Steamed_Punk steamedpunk.mt at gmail.com
-- SLEEPEE TEEPEE
beds.register_bed("nativeamericanvillage:tepee", {
description = "Sleepee Tepee",
drawtype = "mesh",
mesh = "indianvillage_teepee01.obj",
tiles = {"indianvillage_teepee01.png"},
wield_image = "item_teepee01.png",
inventory_image = "item_teepee01.png",
buildable_to = false,
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2, flammable=3},
on_place = minetest.rotate_node,
selectionbox = {-1.5, -0.5, -1.5, 1.5, 1.5, 1.5},
collisionbox = {-1.5, -0.5, -1.5, 1.5, 1.5, 1.5},
recipe = {
{'', 'default:stick ', ''},
{'default:stick','nativeamericanvillage:buffalotanned', 'default:stick '},
{'default:stick', 'nativeamericanvillage:buffalotanned', 'default:stick '},
},
})
INIT.LUA
-- Native American Village by Steamed_Punk (CC BY-NC 3.0)
local path = minetest.get_modpath("nativeamericanvillage")
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- Native American Village
dofile(path .. "/indianvillage.lua") -- Steamed_Punk
dofile(path .. "/decor.lua") -- Steamed_Punk
dofile(path .. "/bbcanoe.lua") -- Steamed_Punk
dofile(path .. "/campfire.lua") -- Steamed_Punk
dofile(path .. "/buffalo.lua") -- Steamed_Punk
dofile(path .. "/tools.lua") -- Steamed_Punk
dofile(path .. "/ore.lua") -- Steamed_Punk
dofile(path .. "/tanning.lua") -- Steamed_Punk
print (S("[MOD] Native American Village loaded"))
DEBUG.TXT
2020-09-15 22:45:19: [Main]: Automatically selecting world at [/home/usr/.minetest/worlds/Native lands]
2020-09-15 22:45:23: ACTION[Main]: [MOD] Mobs Redo loaded
2020-09-15 22:45:23: WARNING[Main]: Undeclared global variable "beds" accessed at ....minetest/mods/Native-American-Village/indianvillage.lua:10
2020-09-15 22:45:23: ERROR[Main]: ModError: Failed to load and run script from /home/usr/.minetest/mods/Native-American-Village/init.lua:
2020-09-15 22:45:23: ERROR[Main]: ....minetest/mods/Native-American-Village/indianvillage.lua:10: attempt to index global 'beds' (a nil value)
2020-09-15 22:45:23: ERROR[Main]: stack traceback:
2020-09-15 22:45:23: ERROR[Main]: ....minetest/mods/Native-American-Village/indianvillage.lua:10: in main chunk
2020-09-15 22:45:23: ERROR[Main]: [C]: in function 'dofile'
2020-09-15 22:45:23: ERROR[Main]: ...e/usr/.minetest/mods/Native-American-Village/init.lua:10: in main chunk
2020-09-15 22:45:23: ERROR[Main]: Check debug.txt for details.
2020-09-15 22:45:23: ACTION[Main]: Server: Shutting down
I have been more or less offline and unwired for almost a year. My brain has gone soft and slow. I hope people are still around and well.
For those that remember i built a Native American Village (for fun) you could even sleep in the tepee. but not any more.
I get this error message.
ModError: Failed to load and run script from /home/usr/.minetest/mods/Native-American-Village/init.lua:
....minetest/mods/Native-American-Village/indianvillage.lua:10: attempt to index global 'beds' (a nil value)
stack traceback:
....minetest/mods/Native-American-Village/indianvillage.lua:10: in main chunk
[C]: in function 'dofile'
...e/usr/.minetest/mods/Native-American-Village/init.lua:10: in main chunk
Check debug.txt for details.
I know this should be a simple solution but just can't see it. After 5 hours of reading I admit i need a little pointer to get me back on track.
Like i said soft brain after a year from IT.
Cheers
BTW this is on linux mint 20
INDIANVILLAGE.LUA
-- Copyright (C) 2019 Steamed_Punk steamedpunk.mt at gmail.com
-- SLEEPEE TEEPEE
beds.register_bed("nativeamericanvillage:tepee", {
description = "Sleepee Tepee",
drawtype = "mesh",
mesh = "indianvillage_teepee01.obj",
tiles = {"indianvillage_teepee01.png"},
wield_image = "item_teepee01.png",
inventory_image = "item_teepee01.png",
buildable_to = false,
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2, flammable=3},
on_place = minetest.rotate_node,
selectionbox = {-1.5, -0.5, -1.5, 1.5, 1.5, 1.5},
collisionbox = {-1.5, -0.5, -1.5, 1.5, 1.5, 1.5},
recipe = {
{'', 'default:stick ', ''},
{'default:stick','nativeamericanvillage:buffalotanned', 'default:stick '},
{'default:stick', 'nativeamericanvillage:buffalotanned', 'default:stick '},
},
})
INIT.LUA
-- Native American Village by Steamed_Punk (CC BY-NC 3.0)
local path = minetest.get_modpath("nativeamericanvillage")
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- Native American Village
dofile(path .. "/indianvillage.lua") -- Steamed_Punk
dofile(path .. "/decor.lua") -- Steamed_Punk
dofile(path .. "/bbcanoe.lua") -- Steamed_Punk
dofile(path .. "/campfire.lua") -- Steamed_Punk
dofile(path .. "/buffalo.lua") -- Steamed_Punk
dofile(path .. "/tools.lua") -- Steamed_Punk
dofile(path .. "/ore.lua") -- Steamed_Punk
dofile(path .. "/tanning.lua") -- Steamed_Punk
print (S("[MOD] Native American Village loaded"))
DEBUG.TXT
2020-09-15 22:45:19: [Main]: Automatically selecting world at [/home/usr/.minetest/worlds/Native lands]
2020-09-15 22:45:23: ACTION[Main]: [MOD] Mobs Redo loaded
2020-09-15 22:45:23: WARNING[Main]: Undeclared global variable "beds" accessed at ....minetest/mods/Native-American-Village/indianvillage.lua:10
2020-09-15 22:45:23: ERROR[Main]: ModError: Failed to load and run script from /home/usr/.minetest/mods/Native-American-Village/init.lua:
2020-09-15 22:45:23: ERROR[Main]: ....minetest/mods/Native-American-Village/indianvillage.lua:10: attempt to index global 'beds' (a nil value)
2020-09-15 22:45:23: ERROR[Main]: stack traceback:
2020-09-15 22:45:23: ERROR[Main]: ....minetest/mods/Native-American-Village/indianvillage.lua:10: in main chunk
2020-09-15 22:45:23: ERROR[Main]: [C]: in function 'dofile'
2020-09-15 22:45:23: ERROR[Main]: ...e/usr/.minetest/mods/Native-American-Village/init.lua:10: in main chunk
2020-09-15 22:45:23: ERROR[Main]: Check debug.txt for details.
2020-09-15 22:45:23: ACTION[Main]: Server: Shutting down