diff options
author | Brandon <brandon@bremaweb.com> | 2013-06-22 23:24:24 -0500 |
---|---|---|
committer | Brandon <brandon@bremaweb.com> | 2013-06-22 23:24:24 -0500 |
commit | a4edeede2bc1c9f71dd1390f256c62a6ac12e406 (patch) | |
tree | 4a9b092928d1f73c2e8ba966bafdf796600351ed /landsale.lua | |
parent | 77352e526d854cb513e60ed54aa8950e334a8e01 (diff) |
fix 0cr sale problem
Diffstat (limited to 'landsale.lua')
-rw-r--r-- | landsale.lua | 8 |
1 files changed, 7 insertions, 1 deletions
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 |