Because pcall is not try-catch. If it *was* like that, you'd have to use block opening/closing tags such as do/end. pcall is a function that calls other functions. You just happen to be able to pass anonymous functions around in Lua:
local nuclear = {} -- don't forget the local
for i = 1, 255 do
pcall(function() -- we just create an anonymous function here
-- this is not C, 0 evaluates to true (because it's nor false nor nil)
if elem.property(i, "MenuVisible") == 1 and elem.property(i, "MenuSection") == 10 then
nuclear[i] = true -- why store the ID twice?
end
end)
end