fixed nil crash
parent
6d7760d780
commit
d64a3dd2e6
|
@ -16,7 +16,7 @@ for i = 1, #dyes do
|
|||
if arena_lib.is_player_in_arena(placer:get_player_name(), "quikbild") then
|
||||
--minetest.chat_send_all('ln17')
|
||||
local pos = pointed_thing.above
|
||||
if minetest.get_node(pos).name == 'air' or string.find(minetest.get_node(pos).name,'quikbild') then
|
||||
if pos and minetest.get_node(pos).name == 'air' or string.find(minetest.get_node(pos).name,'quikbild') then
|
||||
--minetest.chat_send_all('ln20')
|
||||
minetest.set_node(pos, {name="quikbild:" .. name})
|
||||
|
||||
|
@ -32,7 +32,7 @@ for i = 1, #dyes do
|
|||
on_use = function(itemstack, user, pointed_thing)
|
||||
if arena_lib.is_player_in_arena(user:get_player_name(), "quikbild") then
|
||||
local pos = pointed_thing.under
|
||||
if string.find(minetest.get_node(pos).name,'quikbild') then
|
||||
if pos and string.find(minetest.get_node(pos).name,'quikbild') then
|
||||
|
||||
minetest.set_node(pos, {name="air"})
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue