It's just absolutly what I did first Krock. params.min/max_light doesn't work for the third line (of your code). The debbuger says it can't be concatenated.
However this code placed in 'action' works:
Code: Select all
print("min_light = " .. params.min_light .. " and max_light = " .. params.max_light)
It returns:
min_light = 0 and max_light = 7
It's weird because my code (in 'action' part) looks like this:
Code: Select all
action = function(pos, node)
local node_light = minetest.get_node_light(pos)
print("wanna spawn something with light : " .. node_light) -- Works
print("min_light = " .. params.min_light .. " and max_light = " .. params.max_light) -- Works
if node_light >= params.min_light and node_light <= params.max_light then -- Doesn't work :'(
print('light checks ok')
<action>
end
end
The if part bugs, but the print part does.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!