Greetings
mimilus wrote:09:49:40: ERROR[main]: ========== ERROR FROM LUA ===========
09:49:40: ERROR[main]: Failed to load and run script from
09:49:40: ERROR[main]: /home/mimilus/.minetest/mods/tulips/init.lua:
09:49:40: ERROR[main]: /home/mimilus/.minetest/mods/tulips/init.lua:26: attempt to index global 'dye' (a nil value)
09:49:40: ERROR[main]: stack traceback:
09:49:40: ERROR[main]: /home/mimilus/.minetest/mods/tulips/init.lua:26: in main chunk
09:49:40: ERROR[main]: ======= END OF ERROR FROM LUA ========
09:49:40: ERROR[main]: Server: Failed to load and run /home/mimilus/.minetest/mods/tulips/init.lua
09:49:40: ERROR[main]: ModError: ModError: Failed to load and run /home/mimilus/.minetest/mods/tulips/init.lua
Minetest 0.4.9
I, too, was having this error, having just recently joined the minetest community as of 0.4.9 release.
Yesterday, in the Flags thread, someone posted a list of dye colors and stated that the global 'hues' and 'hues2' had been changed to local values instead, which broke any mods that depended on them being global values. He listed a set of code to be pasted into the init file of the flags mod to make it work again.. I will re-paste that here.
Code: Select all
local HUES = {
"red",
"orange",
"yellow",
"lime",
"green",
"aqua",
"cyan",
"skyblue",
"blue",
"violet",
"magenta",
"redviolet"
}
local HUES2 = {
"Red",
"Orange",
"Yellow",
"Lime",
"Green",
"Aqua",
"Cyan",
"Sky-blue",
"Blue",
"Violet",
"Magenta",
"Red-violet"
}
Upon adding this, however, I ran into a different problem and a new error. Being new to lua, I fiddled around and made a few changes to the init file for tulips.. as such:
Code: Select all
for i = 1, 9 do
--local hue = dye.basecolors[i]
--local hue2 = dye.basecolors[i]
local hue = HUES[i]
local hue2 = HUES2[i]
local img = mod.."_"..hue..".png"
--farming
farming:add_plant(mod..":"..hue, {"tulips:"..hue.."_seeds",mod..":"..hue.."_sprout"}, 60, 2)
this, then produced a new error.. about a global method returning a nil value or somesuch.. so I checked the depends file and it depends on 'farming' which I am using 'farming_plus'
I changed the depends file to reflect this, and the mod loaded properly (I assume) and it does work (harvested an orange and a yellow tulip and planted them/grew them successfully.)
I do not know if this will help you much.. but if it does great
Peace
UOAbigail