PWNAMATRON Posted April 18, 2015 Share Posted April 18, 2015 So I am trying to make a mod that automatically sorts your inventory into a particular order for you (similar to the Sort Mod in DS but I wasn't able to port that directly over without making huge changes to it so I decided to start from scratch). I only know basic programming so it took me a while to figure out what I was doing, but I think I am close now. My biggest problem is knowing the correct syntax to call the functions in inventory_replica and container_replica. Here is an example of what I have tried: local HaveBackpack = ThePlayer.components.inventory_replica.Inventory:GetGetOverflowContainer()backpackcopy = HaveBackpack.components.container_replica.Container:GetItems() I've attached the modmain file so anyone who is interested can look at the context of what I am talking about, feel free to lmk if you want access to the entire mod. I have a feeling my syntax is just terribly wrong (and I probably should know how to use self and inst properly too ) Anyway, thanks for the help!modmain.lua Link to comment Share on other sites More sharing options...
DarkXero Posted April 18, 2015 Share Posted April 18, 2015 local HaveBackpack = ThePlayer.replica.inventory:GetOverflowContainer() HaveBackpack.replica.container:GetItems() Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now