Reports a warning in case a requested event handler function was not run TODO: find a way to pass event's name too, but they are not clearly defined as strings inside the engine atm...
| 118 | // Reports a warning in case a requested event handler function was not run |
| 119 | // TODO: find a way to pass event's name too, but they are not clearly defined as strings inside the engine atm... |
| 120 | static void WarnEventFunctionNotFound(const ScriptFunctionRef &fn_ref, bool in_room) |
| 121 | { |
| 122 | String message = String::FromFormat("WARNING: event script function '%s' not found", |
| 123 | fn_ref.FuncName.GetCStr()); |
| 124 | if (in_room) |
| 125 | message.AppendFmt(" (Room %d)", displayed_room); |
| 126 | else |
| 127 | message.AppendFmt(" (%s)", fn_ref.ModuleName.IsEmpty() ? "Global Script" : fn_ref.ModuleName.GetCStr()); |
| 128 | debug_script_warn("%s", message.GetCStr()); |
| 129 | } |
| 130 | |
| 131 | // Tests if the interaction handler is referencing an existing function in script. |
| 132 | // Writes down the result of the test for the future use. |