Originally Posted by
Orbiter87
Is the auction log reader fully implemented in .49/.50?
Code:
for i=1, xGetLogCount() do
print(xGetLogItem(i).name)
print(xGetLogItem(i).sale)
end
fails on xGetLogItem(i).sale (nil value)
Code:
for i=1, xGetLogCount() do
print(xGetLogItem(i).name)
print(haItem().sale)
end
If I use haItem() I get no error but it always prints 'none'.
The item name gets printed successfully in both examples.
Work perfect for me, both way.
I'm on vacation so i got time, and i arguing about the stuck at lobby problem i have sometime (crash for me seen to be gone but that a different topic)
So observing the Events.lua
Code:
-- These are called when stuff happens. Edit as needed.
-- globals
event_login_delay = 10
-- A logout has occurred
function xEventLogout()
-- login loop
xLogin()
-- locate AH
xLocate('auction.search.equipment')
-- reset old api state
CoreOldReset()
-- reset script
xReset()
end
I decided that it can be transformed like this:
Code:
-- These are called when stuff happens. Edit as needed.
-- A logout has occurred
function xEventLogout()
-- reset script
xReset()
end
Why? because this is called if a logout occurs (so we are out) and every code befor xReset, will be even called after the xReset (after all you execute you code from the begin and if it worked the first time why should now fail?) so everything is redundant beside xReset().
Pls if i'm wrong (is damn hot in here and my brain might be boiling
) trow in a few line.
/bw