iopleke / Minechem

Chemical decomposition and synthesis in Minecraft
http://iopleke.github.io/Minechem/
Other
82 stars 94 forks source link

minechem turtles crash programs if element is stable #770

Open DaComputerNerd717 opened 9 years ago

DaComputerNerd717 commented 9 years ago

I was building a program to identify if an element was radioactive or not. However, when I call the method to check this, it crashes saying that I am calling nil.

An obvious fix would probably be to make it return "stable" in this situation, rather than nil.

RAnders00 commented 9 years ago

You can check for nil yourself, this should NOT be fixed in minechem

local returnValue = someMethodYouAreCalling()
if returnValue ~= nil then
    -- do something if it's unstable, the value will be in `returnValue`
else
    -- do something if it's stable
end