i have an array of big struct, which each has an array of small struct, how to add more small structs to a specific big struct


i want to add an item to the backpack on slot x, but somehow doing this doesn’t add it.(contains is what is in the backpack)
basically i have an array of big struct, inside every big struct there is one array of small struct, how do i add more small structs to a certain big struct’s array of small structs
(sorry if there is something with the phrasing it’s pretty late)

You are probably using Get (copy) instead of get (reference).

I faced a similar situation a while ago,

what I did was creating an array with the struct as a temporary cache. I think there were some limitations if I recall with structs in arrays and it has to be done manually for each entry in the struct. I solved it with a for each loop to then go through the entries to put them into a “cache”-array. And from that array entry in the cache-array you have the item info to be inserted or partially inserted into your backpack.

I hope it helps

1 Like


hm, i was thinking about caching last night but it was too late, well this works(image).might have actually worked before but i thought there was a problem because i didn’t debug propelly

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.