lua-users home
lua-l archive

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



"If there is any error executing the string, then dostring returns nil. 
Otherwise, it returns the values returned by the chunk, or a non-nil 
value if the chunk returns no values" (userdata(0) actually).

if you do:
print(dostring('return '..Name..'_Version()'))

you get what you desire.

-- Danilo


-----Original Message-----
From: owner-lua-l@tecgraf.puc-rio.br
[mailto:owner-lua-l@tecgraf.puc-rio.br]On Behalf Of Markus Huber
Sent: quarta-feira, 9 de janeiro de 2002 00:14
To: Multiple recipients of list
Subject: Limited dostring()?


> Hi Lua Fans,

>    why doesn't work the following example?
>    Name='Test'
>    function Test_Version() return 001 end
>    print(dostring(Name..'_Version()'))

>     Prints: userdata(0): 00000000
> But I need: 1
> Markus