Sign in to follow this  
kwaung

How can I print Lua result on my console?

Recommended Posts

Hi, I make a Quak-like console and use Lua as script. So far I can show only error on my console, I cant show a positive result on my console. I tried a lua_toXXX() command to pull out the result from top stack. And used lua_gettop() just like a stackdump() in the book. But its didn't work. Could you guys tell me how to complete this? Thanks in advance. :)

Share this post


Link to post
Share on other sites
Can you explain a bit more of what your trying to do? Typically you simply call print or debug to display something on the console. If your trying to do this inside of your engine, then you need to override the default methods provided by Lua. If this is your problem, then there is plenty of sample code that you can be pointed to.

- Jeremy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this