" /> " /> "/>

Missing Return Statement Using Script Bool

14 Views Asked by At

My code is throwing a "Missing return statement" but I'm not savvy enough to fully understand why. Here's the code:

script bool FindStr(Array<string> aArray, string aKey)
    foreach (string key in aArray)
    {
        if (key == aKey)
        {
            return true;
        }
    }
end_script

Running the code provides the error statement, and the end_script line is pointed out as being the problem.

0

There are 0 best solutions below