If the user has a script with only a switch statement, with a case statement that has no commands, poryscript does not throw an error and produces undesirable results. It does not write the implied return command at the end of the function, causing unexpected control flow. See the following example:
If StoryPart3_SetupSubquests gets run, instead of calling FunctionCall and returning while doing nothing, control flow instead ends up at the script below it, as there's no return statement at the bottom of the outputted FunctionCall script.
If the user has a script with only a switch statement, with a case statement that has no commands, poryscript does not throw an error and produces undesirable results. It does not write the implied return command at the end of the function, causing unexpected control flow. See the following example:
Input:
Expected Output:
Actual Output:
If
StoryPart3_SetupSubquests
gets run, instead of callingFunctionCall
and returning while doing nothing, control flow instead ends up at the script below it, as there's no return statement at the bottom of the outputtedFunctionCall
script.