lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi!

I'm having some problems when using lua_Debug: just
can't get the right infotmation!

I'm trying do something like this:

///////////////////////////////////////

if(lua_dofile(L, fileName) != 0){

  lua_Debug ar;

  lua_getstack (L, 1, &ar);

  printf("Error\nLine: %d\nText: %s", 
	ar.linedefined,
	ar.source); 
}
///////////////////////////////////////

I just can't get the right values of linedefine or currentline or 
source!

Any tip?

I would like to present to the user the file name, the line and the 
error.