Varsuuk
May 19th, 2019, 03:54
My expectation is that it does nothing, but figured I'd ask in case my mind is about to be blown ;)
When a method (addTraitDB) is called where the return value is not explicitly checked, like so:
for _,v in pairs(DB.getChildren(nodeSource, "traits")) do
addTraitDB(nodeChar, "reference_racialtrait", v.getPath());
end
Does anything special happen based on what, if anything is returned by this method? [EDIT: like "exit the loop"]
In the current implementation, there are returns each of:
return;
return false;
(and the final all went well until the end:)
return true;
Is this is just "habit" and/or "in case in future" type coding?
When a method (addTraitDB) is called where the return value is not explicitly checked, like so:
for _,v in pairs(DB.getChildren(nodeSource, "traits")) do
addTraitDB(nodeChar, "reference_racialtrait", v.getPath());
end
Does anything special happen based on what, if anything is returned by this method? [EDIT: like "exit the loop"]
In the current implementation, there are returns each of:
return;
return false;
(and the final all went well until the end:)
return true;
Is this is just "habit" and/or "in case in future" type coding?