[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problem with 'write(format()) ' wrapper
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 20 Mar 2002 12:50:34 -0300
>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