Fix some missing return values

This commit is contained in:
jacksonmj
2014-05-23 00:00:54 +01:00
parent 7e1076ee5f
commit 7b9f43b8bf
3 changed files with 4 additions and 3 deletions

View File

@@ -1401,8 +1401,7 @@ std::string GameController::ElementResolve(int type, int ctype)
else if (type >= 0 && type < PT_NUM && gameModel->GetSimulation()->elements)
return std::string(gameModel->GetSimulation()->elements[type].Name);
}
else
return "";
return "";
}
bool GameController::IsValidElement(int type)

View File

@@ -1999,7 +1999,7 @@ int LuaScriptInterface::elements_loadDefault(lua_State * l)
luacon_model->BuildMenus();
luacon_sim->init_can_move();
std::fill(luacon_ren->graphicscache, luacon_ren->graphicscache+PT_NUM, gcache_item());
return 0;
}
int LuaScriptInterface::elements_allocate(lua_State * l)
@@ -2296,6 +2296,7 @@ int LuaScriptInterface::elements_property(lua_State * l)
}
else
return luaL_error(l, "Invalid element property");
return 0;
}
else
{

View File

@@ -190,6 +190,7 @@ AnyType TPTScriptInterface::eval(std::deque<std::string> * words)
case TypeString:
return StringType(word);
}
return StringType(word);
}
std::string TPTScriptInterface::FormatCommand(std::string command)