From a4edeede2bc1c9f71dd1390f256c62a6ac12e406 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 22 Jun 2013 23:24:24 -0500 Subject: fix 0cr sale problem --- landsale.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'landsale.lua') diff --git a/landsale.lua b/landsale.lua index 4987e86..6984630 100644 --- a/landsale.lua +++ b/landsale.lua @@ -24,9 +24,15 @@ minetest.register_node("landrush:sale_block",{ -- do the sale -- maybe a are you sure formspec? local name = puncher:get_player_name() local owner = landrush.get_owner(pos) - if ( name ~= owner and owner ~= nil ) then + if ( name ~= owner and owner ~= nil ) then local meta = minetest.get_meta(pos) local price = meta:get_int("price") + + if ( price == 0 ) then + minetest.chat_send_player(name,'Land Sale setup not complete') + return + end + if ( money.get(name) >= price ) then local transfer = money.transfer(name,owner,price) if ( transfer == nil ) then -- cgit v1.2.3