GreenDimond wrote:Tried this, failed to remember to put the last part, and it worked with wrong placement. Added the rest of the code and now it is telling me
2017-01-14 14:58:58: ERROR[Main]: ModError: Failed to load and run script from /home/alex/.minetest/mods/test/init.lua:
2017-01-14 14:58:58: ERROR[Main]: /usr/share/minetest/builtin/common/strict.lua:9: core.global_exists: table: 0x404e1c40 is not a string
2017-01-14 14:58:58: ERROR[Main]: stack traceback:
2017-01-14 14:58:58: ERROR[Main]: [C]: in function 'error'
2017-01-14 14:58:58: ERROR[Main]: /usr/share/minetest/builtin/common/strict.lua:9: in function 'global_exists'
2017-01-14 14:58:58: ERROR[Main]: /home/alex/.minetest/mods/test/init.lua:46: in main chunk
2017-01-14 14:58:58: ERROR[Main]: Check debug.txt for details.
Yes, I added wield3d as soft dependency. Wat do?
Sorry, my bad, `minetest.global_exists` is expecting a string. I have now corrected the code above.
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
if minetest.global_exists("wield3d") then
wield3d.location["swords:big_sword"] = {
"Arm_Right",
{x=0, y=5.5, z=8},
{x=-90, y=225, z=90},
{x=0.25, y=0.25}
}
end
Pro Tip: The value z=8 determines how far forward the object is translated.