Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.

Inventory - Not set to an instance of an object. #659

Closed
dylanpdx opened this issue Nov 5, 2014 · 6 comments
Closed

Inventory - Not set to an instance of an object. #659

dylanpdx opened this issue Nov 5, 2014 · 6 comments

Comments

@dylanpdx
Copy link

dylanpdx commented Nov 5, 2014

Hello!

Whenever I try to retreive the bot's inventory, I get the following error:

ss 2014-11-05 at 03 43 33

The line(s) in question is this:

(544) Bot.GetInventory();
(545) long invitems = Bot.MyInventory.Items.Length;

Any ideas why this is happening?

@scholtzm
Copy link
Contributor

scholtzm commented Nov 6, 2014

It's probably better to use Trade.MyInventory and Trade.OtherInventory. Both are loaded automatically once the trade starts so you don't need to "refresh" these.

btw. #427 and #527

@dylanpdx
Copy link
Author

dylanpdx commented Nov 6, 2014

@scholtzm I'm requesting the inventory outside a trade. My bad, I'll be sure to ask in /r/SteamBot next time. And yes, I do know how to program, it's just that I have not modified any code and this was working a week ago.

@scholtzm
Copy link
Contributor

scholtzm commented Nov 6, 2014

I'm requesting the inventory outside a trade.

Not according to you stack trace. (?) And yeah, just post in the sub. You can also close this.

@dylanpdx dylanpdx closed this as completed Nov 6, 2014
@dylanpdx
Copy link
Author

dylanpdx commented Nov 9, 2014

This is most definitely a bug, It happens with the default user handlers.

Edit: Stacktrace out of trade - http://puu.sh/cIXl1/0568eff3a4.png

@dylanpdx dylanpdx reopened this Nov 9, 2014
@BlueRaja
Copy link
Collaborator

BlueRaja commented Nov 9, 2014

RaffleHandler is not a default user handler, and GetInvPercent (the method that contains the bug in that image) is not from one of the default user handlers.

@BlueRaja BlueRaja closed this as completed Nov 9, 2014
@dylanpdx
Copy link
Author

dylanpdx commented Nov 9, 2014

I'm saying it Also happens with the default handlers. That is my code. The stacktrace for AdminUserHandler and UserHandler contains the same error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants