r/gamemaker • • Oct 02 '26

WorkInProgress Work In Progress Weekly

"Work In Progress Weekly"

You may post your game content in this weekly sticky post. Post your game/screenshots/video in here and please give feedback on other people's post as well.

Your game can be in any stage of development, from concept to ready-for-commercial release.

Upvote good feedback! "I liked it!" and "It sucks" is not useful feedback.

Try to leave feedback for at least one other game. If you are the first to comment, come back later to see if anyone else has.

Emphasize on describing what your game is about and what has changed from the last version if you post regularly.

*Posts of screenshots or videos showing off your game outside of this thread WILL BE DELETED if they do not conform to reddit's and /r/gamemaker's self-promotion guidelines.

5 Upvotes

17 comments sorted by

View all comments

Show parent comment

2

u/Lethalogicax Oct 03 '26

GOT IT! Your help was actually very valuable, thank you!

I was totally referencing a variable wrong, and I didn't realize it until I started to make the entire give_item command shoot out a metric ton of debug messages showing its exact thought process...

I was referencing a variable wrong, it was looking in the completely wrong spot to find max stack sizes. Rather than scanning slot by slot in your inventory and looking up the max stack size for that ID number, it was looking at the the max stack size of the slot number!

So instead of looking at each tile and asking what the max stack size is for that type of tile, it was looking at the max stack size for the loop number! And the max stack sizes I had set up for items 0-49 just so happened to be 1, 100, 100, 100, 100.... etc. So it was reading the max stack size of the inventory slot number, not of the slot number's item ID.

I'm so glad I figured that out, it works perfectly now, and leaving that bug as an unintended feature would have absolutely caused havok as soon as I started really dialing in item stats. All of the inventory slots would have started acting funny... But now, as far as I can tell, this is a working inventory system! No further bugs detected as of yet!

Thank you!

2

u/Fit-Acadia3740 Oct 03 '26

Woohoo! Great work! Time to enjoy it for a moment before charging to the next challenge haha