lua-users home
lua-l archive

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


>> The program that I have written uses a custom file format based on
XML.
>> Everything that the program needs is in this file including my Lua
>> script.  Because the file isn't totally a Lua script, I load the
script
>> using the function luaL_loadbuffer.  I do not want this
implementation
>> detail to be shown to the user, but when an error occurs the error is
>> something like what is shown below.  I do not want the first 16
>> characters.  I know I can remove that portion before I present it to
the
>> user, but I was wondering if this is the preferred approach for this
>> problem.  I want to make sure I'm using the correct function.
>> 
>>  
>> [string "Temp"]:10: bad argument #1

> I'm not sure what you mean, but if you're giving "Temp" as the name of
> the chunk, try giving something that starts with "=". Then it'll be
> shown verbatim (with '=' removed).
> --lhf

I am loading the entire script at once.  The 'name' parameter to
luaL_loadbuffer has to meaning to me, so I do not want it shown in the
error messages.

I do not know what you mean by the '=' character.