From 045e4e775c5d0ee2e7fd489cc3c236861fa5f004 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Sun, 24 Jun 2018 10:46:22 +0430 Subject: fixes 42, fixes 44 --- bruiser/bruiser.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'bruiser/bruiser.cpp') diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 7e6a22e..99f7731 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -1375,22 +1375,24 @@ class LuaWrapper int BruiserPyLoader(lua_State* __ls ) { int numargs = lua_gettop(__ls); //std::string filename = "../bfd/load.py"; - std::string filename = "load"; + //std::string filename = "load"; + std::string filename; std::string funcname; std::string objjpath; std::string action; - if (numargs == 3) { + if (numargs == 4) { if (Verbose) std::cout << CYAN << "got args." << NORMAL << "\n"; - funcname = lua_tostring(__ls, 1); - if (funcname == "") PRINT_WITH_COLOR_LB(RED, "first argument is nil"); - objjpath = lua_tostring(__ls, 2); - if (objjpath == "") PRINT_WITH_COLOR_LB(RED, "second argument is nil"); - action = lua_tostring(__ls, 3); - if (action == "") PRINT_WITH_COLOR_LB(RED, "third argument is nil"); + filename = lua_tostring(__ls, 1); + if (filename == "") PRINT_WITH_COLOR_LB(RED, "first argument is nil"); + funcname = lua_tostring(__ls, 2); + if (funcname == "") PRINT_WITH_COLOR_LB(RED, "second argument is nil"); + objjpath = lua_tostring(__ls, 3); + if (objjpath == "") PRINT_WITH_COLOR_LB(RED, "third argument is nil"); + action = lua_tostring(__ls, 4); + if (action == "") PRINT_WITH_COLOR_LB(RED, "fourth argument is nil"); std::cout << NORMAL; - } - else { + } else { std::cout << RED << "wrong number of arguments provided. should give the python script name, python func name and the return type.\n" << NORMAL; return EXIT_FAILURE; } -- cgit v1.2.3