Beispiel #1
0
std::string GetConfsInt(std::string Name, std::string Namespace, LuaManager &L)
{
    std::string Retval;
    if (Namespace.length())
    {
        if (L.UseArray(Namespace))
        {
			if (L.CallFunction(Name.c_str(), 0, 1)) {
				if (L.RunFunction())
					Retval = L.GetFunctionResultS();
			}
			else {
				Retval = L.GetFieldS(Name);
			}
			L.Pop();
		}
    }
    else {
		if (L.CallFunction(Name.c_str(), 0, 1)) {
			if (L.RunFunction())
				Retval = L.GetFunctionResultS();
		} else
	        Retval = L.GetGlobalS(Name);
	}
    return Retval;
}