diff --git a/src/blua/lbaselib.c b/src/blua/lbaselib.c
index 830043f3011c20c4d7271c3060008ea5f1b6d257..d7bdc8204f7825b5c9e291bb6bbb83135981bd2f 100644
--- a/src/blua/lbaselib.c
+++ b/src/blua/lbaselib.c
@@ -292,7 +292,6 @@ static int luaB_loadfile (lua_State *L) {
   const char *filename = luaL_checkstring(L, 1);
   char fullfilename[256];
   UINT16 lumpnum;
-  int n = lua_gettop(L);
 
   if (wadfiles[numwadfiles - 1]->type != RET_PK3)
     luaL_error(L, "loadfile() only works with PK3 files");