[books] Books Mod

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

by tinoesroho » Mon Sep 30, 2013 13:03

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 » Tue Oct 14, 2014 15:56

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 » Tue Oct 14, 2014 16:15

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 » Thu Jan 01, 2015 21:47

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 » Thu Jan 01, 2015 21:59

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 » Fri Jan 02, 2015 10:09

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!
 

Previous

Return to WIP Mods



Who is online

Users browsing this forum: gpcf, Miniontoby and 4 guests