Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. after_place_node = function(pos, placer)
  2. whoplacedit = placer:get_player_name()
  3. print(whoplacedit)
  4. node = minetest.env:get_node(pos)
  5. ntop = minetest.env:get_node({x=pos.x, y=pos.y+1, z=pos.z})
  6. if ntop.name ~= "air" then
  7. minetest.node_dig(pos, node, whoplacedit)
  8. end
  9. end,
  10.  
  11. output on terminal:
  12.  
  13. singleplayer
  14. node_dig
  15. 02:17:16: ACTION[ServerThread]: singleplayer leaves game. List of players:
  16. 02:17:17: ERROR[main]: ServerError: LuaError: error: ...a/celeron55-minetest-9696ed3/bin/../builtin/item.lua:286: attempt to call method 'get_player_name' (a nil value)
  17. 02:17:17: ERROR[main]: stack traceback:
  18. Quit message received.
  19. vanessa@rainbird:~$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement