summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon <brandon@bremaweb.com>2013-06-22 23:24:24 -0500
committerBrandon <brandon@bremaweb.com>2013-06-22 23:24:24 -0500
commita4edeede2bc1c9f71dd1390f256c62a6ac12e406 (patch)
tree4a9b092928d1f73c2e8ba966bafdf796600351ed
parent77352e526d854cb513e60ed54aa8950e334a8e01 (diff)
fix 0cr sale problem
-rw-r--r--landsale.lua8
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