Jump to content

ControlSetupWindow error


photo

Recommended Posts

Posted

Hello.

 

I try to use ControlSetupWindow (InputSystem topic from manual), but when I include import #include <scripts/input/control_setup_window.h> in empty world project I get error:

void show(Control control_) {

scripts/input/control_setup_window.h:294: Interpreter::parse_function_prototype(): unknown type of argument "Control" in "show" function

 

Is it bug, or I need to include some additional files?

test.cpp:

 

#include <scripts/input/control_setup_window.h>

int init() {
engine.game.setPlayer(new PlayerSpectator());
return 1;
}

int shutdown() {
return 1;
}

int update() {
return 1;
}

  • Like 1
Posted

Is it bug, or I need to include some additional files?

 

Add #include <scripts/input/control.h> as class Control is defined there

  • Like 1
Posted

Ok, thanks, it's works... another question the same type :)

In network demos some variables have type auto, so when I try to launch shooter demo, I get this error:

 

12:37:36 Unigine~# world_load network/shooter/shooter_world

12:37:39 else cur_size++;

12:37:39 network/common/circular_buffer.h:109: Interpreter::parse_function_prototype(): unknown type of argument "auto" in "append" function

 

what I need to do to avoid this problem? Thanks.

  • Like 1
Posted

Ok, thanks, it's works... another question the same type :)

In network demos some variables have type auto, so when I try to launch shooter demo, I get this error:

 

12:37:36 Unigine~# world_load network/shooter/shooter_world

12:37:39 else cur_size++;

12:37:39 network/common/circular_buffer.h:109: Interpreter::parse_function_prototype(): unknown type of argument "auto" in "append" function

 

what I need to do to avoid this problem? Thanks.

 

"auto" type was removed in last update. But network samples were not fixed. Sorry about that.

 

Just replace all "auto" occurrences with "int".

  • Like 1
Posted

Ok, done. Now I get new problem:

 

14:08:37 Unigine~# world_load network/shooter/shooter_world

14:08:38 PlayerInfo(NetworkAddress a,string n) {

14:08:38 network/shooter/scripts/session_manager.h:42: Interpreter::parse_function_prototype(): unknown type of argument "NetworkAddress" in "__PlayerInfo__" function

  • Like 1
Posted

Ok, done. Now I get new problem:

 

14:08:37 Unigine~# world_load network/shooter/shooter_world

14:08:38 PlayerInfo(NetworkAddress a,string n) {

14:08:38 network/shooter/scripts/session_manager.h:42: Interpreter::parse_function_prototype(): unknown type of argument "NetworkAddress" in "__PlayerInfo__" function

 

To enable networking functionality you need to use the following option while launching Unigine application:

-extern_plugin Network

See this post for reference and chat launchers for example of usage

 

Also shooter uses it's own system script and game configuration file that should be specified at startup too.

 

Here is an example of command I use to run shooter:

 

main_x86d -console_command "world_load network/shooter/shooter_menu" -system_script network/shooter/shooter_system.cpp -data_path ../ \
-engine_config ../data/unigine.cfg -engine_log log_server.htm -game_config network/shooter/config/shooter_dedicated_server.cfg \
-disable_start_menu 1 -extern_plugin Network

We'll add launchers for network samples in the next SDK update.

  • Like 1
×
×
  • Create New...