[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Redirecting console output
- From: "Kevin Watters" <kwatters@...>
- Date: Mon, 24 Feb 2003 20:20:07 -0500
I've implemented an in-game lua console in my 2D sidescroller, and
successfully exposed certain functions to the environment. When the user
types text and hits enter, lua_dostring is invoked. I can show return
values from the stack, but what about console print for statements like
table.foreach(_G,print)
to show all the global variables? How do I go about capturing the output
from print to show in my in-game console? Do I need to reroute the cout or
cerr streams?
-Kevin Watters