Unaccessable item wear

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

Unaccessable item wear

by LorenzoVulcan » Wed Jan 09, 2013 20:20

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
local .. = function(pos, node, puncher)
    local item = puncher:get_wielded_item()
    if item:get_name() == ".." then
        ..
        item:add_wear(-1000)
            end
        end
    end


I can actually print the wear but i can't add any value.

Can anyone help me please?
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Jan 09, 2013 20:21

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
puncher:set_wielded_item(item)
 

User avatar
xyz
Member
 
Posts: 449
Joined: Thu Nov 10, 2011 14:25

by xyz » Wed Jan 09, 2013 20:23

 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Wed Jan 09, 2013 20:25

PilzAdam wrote:
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
puncher:set_wielded_item(item)

I tried but it just resets me the wear.
--EDIT:Solved,Thanks all ;)
Last edited by LorenzoVulcan on Wed Jan 09, 2013 20:39, edited 1 time in total.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 11 guests

cron