diff --git a/inhabitants.lua b/inhabitants.lua index bba610b..20cfac8 100644 --- a/inhabitants.lua +++ b/inhabitants.lua @@ -498,7 +498,7 @@ mg_villages.inhabitants.print_house_info = function( village_to_add_data_bpos, h people_str = minetest.formspec_escape( mg_villages.inhabitants.mob_get_full_name( owner, owner ).." owns this plot"); end - elseif( not( bpos.beds ) or #bpos.beds<1 and bpos.worker and bpos.worker.title) then + elseif( (not( bpos.beds ) or #bpos.beds<1) and bpos.worker and bpos.worker.title) then if( not( bpos.worker.lives_at)) then str = str.."WARNING: NO WORKER assigned to this plot."; else diff --git a/plotmarker_formspec.lua b/plotmarker_formspec.lua index 9026b52..e796e9e 100644 --- a/plotmarker_formspec.lua +++ b/plotmarker_formspec.lua @@ -43,12 +43,7 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player ) if( not( plot.btype ) or not( mg_villages.BUILDINGS[ plot.btype ] ) or not( mg_villages.BUILDINGS[ plot.btype ].mts_path ) or not( mg_villages.BUILDINGS[ plot.btype ].scm )) then - minetest.chat_send_player( pname, 'Error. Unkown building. btype: '..tostring( plot.btype )); - if( plot.btype and mg_villages.BUILDINGS[ plot.btype ] ) then - minetest.chat_send_player( pname, 'Further information: mts_path: '.. - tostring( mg_villages.BUILDINGS[ plot.btype ].mts_path )..' scm: '.. - tostring( mg_villages.BUILDINGS[ plot.btype ].scm )..'.'); - end + minetest.chat_send_player( pname, 'Error. Unknown building. btype: '..tostring( plot.btype )); return; end local building_name = mg_villages.BUILDINGS[ plot.btype ].mts_path..mg_villages.BUILDINGS[ plot.btype ].scm;