Say I have two add-ons, Script_Test1 and Script_Test2. The server.cs in Script_Test1 has the code
if(forceRequiredAddOn("Script_NotAnAddOn") == $Error::AddOn_NotFound) {
error("Script_Test1 will not load");
$test1 = false;
return;
}
$test1 = true;
and the server.cs in Script_Test1 has the code
if(forceRequiredAddOn("Script_Test1") == $Error::AddOn_NotFound) {
error("Script_Test2 will not load");
$test2 = false;
return;
}
$test2 = true;
To be explicitly clear, Script_NotAnAddOn When I enabled them both and start a server, $test1 is given the value 0, as expected. However, $test2 is given the value 1, which is not satisfactory. How do I ensure Script_Test2 cannot be loaded when Script_Test1 cannot be loaded? Is there a standard way to handle this, or would it require some sort of support add-on?
Perhaps there's some way to force forceRequiredAddOn() to return $Error::AddOn_NotFound?
EDIT: made title more pertinent