From d00720a2f21170c27c0aa9eb84094f9185ed4617 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sat, 26 Dec 2015 19:57:12 +0100 Subject: [PATCH] Fixed commandline CBot interpreter not initializing the library properly --- test/cbot/console/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/cbot/console/main.cpp b/test/cbot/console/main.cpp index e6b1a4eb..6e6e8777 100644 --- a/test/cbot/console/main.cpp +++ b/test/cbot/console/main.cpp @@ -38,11 +38,13 @@ int main(int argc, char* argv[]) code += "\n"; } + // Initialize the CBot engine, add standard library functions + CBotProgram::Init(); + CBotProgram::AddFunction("message", rMessage, cMessage); + // Error message strings are stored on Colobot side (meh!) so let's initialize that InitializeRestext(); - // Initialize the CBot engine, add standard library functions - CBotProgram::AddFunction("message", rMessage, cMessage); // Compile the program std::vector externFunctions;