|
Uli Kusterer wrote:
int UKAdventureRoomToString( lua_State *pLuaState ) { UKRoom* self = UKAdventureRoomGetThis( pLuaState ); lua_pushfstring( pLuaState, "Room(%lx)", (unsigned long)self ); return 1; }
If you work with Lua 5.1w6, then try: lua_pushfstring( pLuaState, "Room(%p)", self ); Otherwise, use sprintf and lua_pushstring. (lua_pushfstring doesn't support %x). -- Shmuel