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

Function PrepareTextScript

Engine/script/script.cpp:373–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373static RunScFuncResult PrepareTextScript(const RuntimeScript *script, const String &tsname)
374{
375 assert(script);
376 cc_clear_error();
377 if (scriptExecutor->IsBusy())
378 {
379 cc_error("script is currently in execution");
380 return kScFnRes_ScriptBusy;
381 }
382 if (!DoesScriptFunctionExist(script, tsname))
383 {
384 cc_error("no such function in script");
385 return kScFnRes_NotFound;
386 }
387 executingScripts.push(std::make_unique<ExecutingScript>(script));
388 curExecScript = executingScripts.top().get();
389 update_script_mouse_coords();
390 inside_script++;
391 return kScFnRes_Done;
392}
393
394void PostScriptProcessing();
395

Callers 1

RunScriptFunctionFunction · 0.85

Calls 7

cc_clear_errorFunction · 0.85
DoesScriptFunctionExistFunction · 0.85
pushMethod · 0.80
cc_errorFunction · 0.50
IsBusyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected