Merge pull request #797 from blueyed/display-screen-count-with-checkscreen
luaA_checkscreen: display number of existing screens with error [ci skip]
This commit is contained in:
commit
187b32630f
|
@ -107,7 +107,8 @@ luaA_checkscreen(lua_State *L, int sidx)
|
|||
{
|
||||
int screen = lua_tointeger(L, sidx);
|
||||
if(screen < 1 || screen > globalconf.screens.len)
|
||||
luaL_error(L, "invalid screen number: %d", screen);
|
||||
luaL_error(L, "invalid screen number: %d (of %d existing)",
|
||||
screen, globalconf.screens.len);
|
||||
return globalconf.screens.tab[screen - 1];
|
||||
} else
|
||||
return luaA_checkudata(L, sidx, &screen_class);
|
||||
|
|
Loading…
Reference in New Issue