On a suggestion, I put everything on GitHub (but you'll see how messy it is soon enough)
Error
Code: Select all
ModError: Failed to load and run script from D:\Users\Vee\Documents\!!!Games\Open World\minetest-5.5.1-win64\bin\..\mods\mindeca\Mindeca Main\init.lua:
...-5.5.1-win64\bin\..\mods\mindeca\Mindeca Main/baking.lua:78: 'end' expected (to close 'for' at line 26) near '<eof>'
stack traceback:
[C]: in function 'dofile'
...st-5.5.1-win64\bin\..\mods\mindeca\Mindeca Main\init.lua:16: in main chunk
Check debug.txt for details.
Code: Select all
local hbmod = minetest.global_exists("hbhunger")
-----
--Pies
-----
mindeca.mpies = {
--{"Fruit", "Hunger Boost", "Effect (To Be Implemented once I figure out how"},
--Spring
--Summer
{"peach", 4, nil}
--Autumn
--Winter
}
mindeca.pieparts = {
--Spring
--Summer
peach = {
mpiedesc = "Peach\n\nA juicy peach for a quick snack.\n\nMindeca",
},
--Autumn
--Winter
}
for i in ipairs(mindeca.mpies) do
local mpie = mindeca.mpies[i][1]
local mhun = mindeca.mpies[i][2]
local mpieseat = 1
minetest.register_node("mindeca:item_cook_pie_"..mpie..mpieseat, {
description = mindeca.baking[pieparts].mpiedesc,
drawtype = "mesh",
collision_box = {
type = "fixed",
fixed = {-8/16, -8/16, -8/16, 8/16, -2/16, 8/16},
},
selection_box = {
type = "fixed",
fixed = {-8/16, -8/16, -8/16, 8/16, -2/16, 8/16},
},
mesh = "mindeca_pie"..mpieseat..".obj",
tiles = {"mindeca_cook_pie_"..mpie..".png"},
inventory_image = "mindeca_item_cook_pie_tin.png",
groups = {oddly_breakable_by_hand = 1},
drop = "mindeca:item_cook_pie_"..mpie,
sounds = default.node_sound_stone_defaults(),
--Right Click function thanks to Blockhead and TenPlus
on_rightclick = function(pos, node, clicker)
if hbmod then
local sat = tonumber(hbhunger.SAT_MAX)
local h = tonumber(hbhunger.hunger[clicker:get_player_name()])
h = math.min(h + mhun)
if h > sat then
h = sat
end
hbhunger.hunger[clicker:get_player_name()] = h
hbhunger.set_hunger_raw(clicker)
minetest.sound_play("mindeca_eat", {
pos = pos, gain = 0.7, max_hear_distance = 4})
mpieseat = math.min(mpieseat + 1)
if mpieseat > 4 then
minetest.set_node(pos, {name = "mindeca:item_cook_pie_tin"})
else minetest.set_node(pos, {name = "mindeca:item_cook_pie_"..mpie..mpieseat})
end
else local h = clicker:get_hp()
h = math.min(h + mhun, 20)
clicker:set_hp(h)
minetest.sound_play("mindeca_eat", {
pos = pos, gain = 0.7, max_hear_distance = 4})
mpieseat = math.min(mpieseat + 1)
if mpieseat > 4 then
minetest.set_node(pos, {name = "mindeca:item_cook_pie_tin"})
else minetest.set_node(pos, {name = "mindeca:item_cook_pie_"..mpie..mpieseat})
end
end
end
})
Repository: https://github.com/Icalasari/Mindeca-Ma ... eca%20Main
(Yes it's a huge mess, it'll be cleaned up closer to release)
EDIT: Right, forgot to explain why I think it's not what it says. When I do add more ends, it then switches to wanting me to put }) at a portion that would cut out a chunk of the code. So something else seems to be up