lua-users home
lua-l archive

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


>If I call the Printf function
>in the script with something like Printf(undeclared), then my _PRINTF
>function gets NULL as a string.

Apparently _PRINTF is written in C and you're calling lua_tostring(L,1)
without first checking lua_isstring(L,1). format checks this and so the
error message. (lua_tostring returns NULL for everything that is not a string
or number, including nil.)
	--lhf