MCPcopy Create free account
hub / github.com/adventuregamestudio/ags / WarnEventFunctionNotFound

Function WarnEventFunctionNotFound

Engine/script/script.cpp:120–129  ·  view source on GitHub ↗

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...

Source from the content-addressed store, hash-verified

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...
120static 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.

Callers 1

test_interaction_handlerFunction · 0.85

Calls 4

GetCStrMethod · 0.80
AppendFmtMethod · 0.80
debug_script_warnFunction · 0.50
IsEmptyMethod · 0.45

Tested by 1

test_interaction_handlerFunction · 0.68