Skip to content

Fix InventoryDef.Properties causing NullReferenceException#748

Open
peterdwdawe wants to merge 1 commit intoFacepunch:masterfrom
peterdwdawe:fix-inventory-def-properties-bug
Open

Fix InventoryDef.Properties causing NullReferenceException#748
peterdwdawe wants to merge 1 commit intoFacepunch:masterfrom
peterdwdawe:fix-inventory-def-properties-bug

Conversation

@peterdwdawe
Copy link
Copy Markdown

Fixes #747

…lReferenceException, and returns properties correctly.
@KalleGH
Copy link
Copy Markdown

KalleGH commented Sep 2, 2024

Why is this not merged yet? :) I really need this to work, I cant fetch the properties of items in steam inventory and I really need that to work. Plz plz merge

@KalleGH
Copy link
Copy Markdown

KalleGH commented Sep 2, 2024

Is there any way for me to use this?

@peterdwdawe
Copy link
Copy Markdown
Author

Is there any way for me to use this?

I don't know if this repo is still active, which is probably why you arent getting any responses. This fix was pretty straightforward though. Just need to add a null check in inventorydef.cs (take a look at my commit).

I'd recommend cloning the repo and building it yourself, that was what I ended up doing. If you're using unity like me then you can just replace the old files with the new ones you just built, keeping all the old meta files, etc.

@KalleGH
Copy link
Copy Markdown

KalleGH commented Sep 4, 2024

Well, it turned out I was just doing it all wrong.
..
I was asking for: item.def.propeties
Turned out item.properties worked 100%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessing InventoryDef.Properties throws a Null Reference Exception

2 participants