--- /home/yonatyt/simu-git/simutrans-master/script/api/api_command.cc 2020-03-12 09:44:15.000000000 -0400 +++ /home/yonatyt/simu-git/files/api_command.cc 2020-03-23 23:37:14.997469000 -0400 @@ -197,7 +197,7 @@ tool->flags |= tool_t::WFL_NO_CHK; } // sanity check - if (player == NULL) { + if (player == NULL && v.tool != ::create_tool(TOOL_MARKER)) { return sq_raise_error(vm, "Called tool with player == null"); } uint8 flags = tool->flags; // might be reset by init()