Page 1 of 1

Unaccessable item wear

PostPosted: Wed Jan 09, 2013 20:20
by LorenzoVulcan
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?

PostPosted: Wed Jan 09, 2013 20:21
by PilzAdam
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)

PostPosted: Wed Jan 09, 2013 20:23
by xyz

PostPosted: Wed Jan 09, 2013 20:25
by LorenzoVulcan
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 ;)