For a project I'm making a text-based game. I want to have an inventory system in which the player use or drop items. If the player uses an item, it should give them more health and/or strength. My items are kept in a class so I can keep track of the names and effects of each item. However, I'm having trouble getting the code right. Right now I have this:
The 'blank' object is a place holder, I don't know if theres a better way to handle that.
Both "choice" and "selection" are declared globally.
It looks super messy, I know. I've tried combining some amalgamation of what I've been able to learn from other forum posts, but after a certain point I really needed to ask about my issue specifically. Any help is appreciated. Need this figured out ASAP
can you try uploading everything (source files like npc.h,main.h, etc) to github?
I'm actually interested in looking at it.
For your question though, I'm afraid I'm not sure how to help without the rest of the code, though someone else might be able to if you really dont wanna upload the other files somewhere,