diff options
| -rw-r--r-- | lauxlib.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.96 2003/03/18 12:25:32 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.97 2003/03/18 18:48:31 roberto Exp roberto $ |
| 3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -45,9 +45,7 @@ LUALIB_API int luaL_argerror (lua_State *L, int narg, const char *extramsg) { | |||
| 45 | if (strcmp(ar.namewhat, "method") == 0) { | 45 | if (strcmp(ar.namewhat, "method") == 0) { |
| 46 | narg--; /* do not count `self' */ | 46 | narg--; /* do not count `self' */ |
| 47 | if (narg == 0) /* error is in the self argument itself? */ | 47 | if (narg == 0) /* error is in the self argument itself? */ |
| 48 | return luaL_error(L, | 48 | return luaL_error(L, "calling `%s' on bad self (%s)", ar.name, extramsg); |
| 49 | "calling %s on bad self (perhaps using `:' instead of `.')", | ||
| 50 | ar.name); | ||
| 51 | } | 49 | } |
| 52 | if (ar.name == NULL) | 50 | if (ar.name == NULL) |
| 53 | ar.name = "?"; | 51 | ar.name = "?"; |
