package setRandomSpeedKart
{
function loadAddOns()
{
echo("\c2Add-Ons loaded.");
parent::loadAddOns();
echo("\c2Add-Ons loaded.");
//Do this stuff after all add-ons have been executed.
if(!setRandomSpeedKart_Check())
{
error("No speedkarts found.");
}
}
};
activatePackage(setRandomSpeedKart);
I want to have the console display an error if setRandomSpeedKart_Check() returns false after all add-ons have been executed. So I parented the loadAddOns function to do this and put the error after the parent. The problem is, none of it ever shows up. The error does not show up when setRandomSpeedKart_Check() returns false and the echos don't show up either. Although, I tried manually calling loadAddOns(); and it worked fine.