static int luaFuncSetOption(lua_State* l) { Block* b = mbGetActiveContext()->ActiveBlock(); if (!b) { MB_LOGERROR("must be within a block"); mbExitError(); } std::string group, key, value; mbLuaToStringExpandMacros(&group, b, l, 1); mbLuaToStringExpandMacros(&key, b, l, 2); mbLuaToStringExpandMacros(&value, b, l, 3); b->SetOption(group, key, value); return 0; }