Jump to content

[SOLVED] how to call engine.console.run script function in C++ function?


photo

Recommended Posts

hello all,

 

 

 

I call a system script function engine.console.run with some command and parameters in C++ interface Unigine::Engine::runSystem(). I call it like this

string path = "D:\example.world";

engine->runSystem("engine.console.run", Variable("world_reload"), Variable(path));

 

when executes, the console complain the following errors:

Interpreter::get_extern_function() : can not find "engine.console.run" function with 2 auguments.

 

the engine.console.run itself is a variable paremeter function with the definition as:

engine.console.run(string command, ...);

 

so what is the right method to call such script function in a C++ function?

 

thanks in advance.gine.console.runystem

 

I call a reload_world command with a path to a world file like this

 

string str = "D:\example.world";

 

engine->runSystem("engine.console.run", Unigine::Variable("world_reload"), Unigine::Variable(str));

 

when execute, the console complain the following errors:

 

Interpreter::get_extern_function(): can't find "engine.console.run" function with 2 arguments

Interpreter::runFunction(): bad function id 0

 

so what is the right method to call this function in C++ functions?

 

 

thanks in advance!

Link to comment
×
×
  • Create New...