[books] Books Mod

tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

Yeah, you can edit. Look in the "actionbar" beneath a post, to the right, and you should see Edit on your own. :-)
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

gamergardencat
Member
Posts: 55
Joined: Wed Oct 01, 2014 11:58

Re: [books] Books Mod

by gamergardencat » Post

10:47:21: ERROR[main]: ========== ERROR FROM LUA ===========
10:47:21: ERROR[main]: Failed to load and run script from
10:47:21: ERROR[main]: C:\Users\gamergardencat\Desktop\Workbench\MinetestMain\minetest-0.4.10-64bit\bin\..\mods\books\init.lua:
10:47:21: ERROR[main]: ...estMain\minetest-0.4.10-64bit\bin\..\mods\books\init.lua:121: unexpected symbol near 'then'

Lines 117-130

Code: Select all

minetest.register_on_punchnode(function(pos, node, puncher) 	
if node.name == "default:bookshelf" then
hit_with = puncher:get_wielded_item()				
if hit_with_name == "books:pencil" then
then
			local meta = minetest.env:get_meta(pointed_thing.under)
			meta:set_string("formspec", get_write_formspec(meta))
			meta:set_string("infotext", "Bookshelf (editable)")
			itemstack:add_wear(65535/50)
			return itemstack
		end
	end,
})
Misplaced then?
minetest.register_on_punchnode looks like old api. Or maybe not. http://dev.minetest.net/minetest.register_on_punchnode
superman slices a giant apple into 3 and hands it to guest220

gamergardencat
Member
Posts: 55
Joined: Wed Oct 01, 2014 11:58

Re: [books] Books Mod

by gamergardencat » Post

Replacement code.

Code: Select all

minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
	if puncher:get_wielded_item():get_name() == "default:bookshelf"
  then
    hit_with = puncher:get_wielded_item()
    if hit_with_name == "books:pencil"
    then
      local meta = minetest.env:get_meta(pointed_thing.under)
        meta:set_string("formspec", get_write_formspec(meta))
        meta:set_string("infotext", "Bookshelf (editable)")
        itemstack:add_wear(65535/50)
        return itemstack
    end
  end
end)
Image

I don't see how to write in it.
superman slices a giant apple into 3 and hands it to guest220

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [books] Books Mod

by gumangel » Post

i cant start a new line i press shift+(a specific key) to write | but is not working.beside that the mod is amazing!

tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

Re: [books] Books Mod

by tinoesroho » Post

Hi!

Sorry to hear that it's broken. I don't maintain this mod, but you should check out it's modern successor: Bookex. Kaeza includes it as part of his mods collection - you can download it all as a zip, here.

gumangel
Member
Posts: 23
Joined: Thu Jan 01, 2015 21:44
In-game: LaA

Re: [books] Books Mod

by gumangel » Post

tinoesroho wrote:Hi!

Sorry to hear that it's broken. I don't maintain this mod, but you should check out it's modern successor: Bookex. Kaeza includes it as part of his mods collection - you can download it all as a zip, here.
thank you really much!

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests