Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uba.remove_item_conf = function(arena_name,name,itemstring)
- print("itemstring "..dump(itemstring))
- local conf_file = Settings(uba.mod_path.."/"..arena_name.."/items.conf")
- print("path "..dump(uba.mod_path.."/"..arena_name.."/items.conf"))
- if conf_file:remove(itemstring) then
- conf_file:write()
- minetest.chat_send_player(name,"* "..itemstring.." removed from "..arena_name.."/items.conf")
- else
- minetest.chat_send_player(name,"*Could not remove unknown item")
- end
- end
- > console output
- > itemstring "default:sword_diamond"
- > path "/home/raphael/minetest/bin/../mods/uba/test/items.conf"
- and finally items.conf after execution
- default:sword_diamond = 4
- default:sword_wood = 4
Advertisement
Add Comment
Please, Sign In to add comment