MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / evaluate

Function evaluate

Engine/source/console/console.cpp:1509–1527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1507}
1508
1509ConsoleValue evaluate(const char* string, bool echo, const char *fileName)
1510{
1511 ConsoleStackFrameSaver stackSaver;
1512 stackSaver.save();
1513
1514 if (echo)
1515 {
1516 if (string[0] == '%')
1517 Con::printf("%s", string);
1518 else
1519 Con::printf("%s%s", getVariable( "$Con::Prompt" ), string);
1520 }
1521
1522 if(fileName)
1523 fileName = StringTable->insert(fileName);
1524
1525 CodeBlock *newCodeBlock = new CodeBlock();
1526 return std::move(newCodeBlock->compileExec(fileName, string, false, fileName ? -1 : 0));
1527}
1528
1529//------------------------------------------------------------------------------
1530ConsoleValue evaluatef(const char* string, ...)

Callers 15

onTriggerMethod · 0.85
getValueMethod · 0.85
preloadMethod · 0.85
trigger_new_phraseMethod · 0.85
onTriggerMethod · 0.85
getValueMethod · 0.85
DefineEngineFunctionFunction · 0.85
restoreMethod · 0.85
performSubstitutionsMethod · 0.85
spawnObjectFunction · 0.85
TESTFunction · 0.85
RunScriptFunction · 0.85

Calls 5

printfFunction · 0.85
getVariableFunction · 0.85
compileExecMethod · 0.80
saveMethod · 0.45
insertMethod · 0.45

Tested by 4

TESTFunction · 0.68
RunScriptFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68