This is my first post here, let me know if I'm posting in the wrong place.
I have been a coder of C/C++ for 3 years, but I stopped using it for 3 years. I've re-read a book of mine, and I can build with C just fine. I understand it perfectly.
My issue is that to get back into the swing of things, I've taken on a pretty simplistic project for SMAUG codebase, which is obviously based in C. In a nutshell, this would be to create a command 'haggle' that would allow a player to 'haggle itemname price' and based on int/cha/lck and some randomization allow the player to either get a lower shop price on that item (for the rest of the shop's hours), or to fail and have ALL store prices go up for the rest of the store's hours.
My problem isn't constructing this in C. My problem is that I have to reference a number of functions to get information from them in order to do this. Character statistics, etc plus the shop commands to update. I'm not sure if this is really a question more than frustration.
If I started from scratch, the simple mathematics of it would be fine. Referencing other functions that are pretty large and confusing to me is my problem, and I'm finding myself unable to really construct it to pull those variables and "do" the command.
Could someone maybe give me a shell on how I might construct this? Feel free to use imaginary function names etc, just so I have an idea of maybe how to approach this better. I think my approach is overwhelming and I'm diving in the middle of the SMAUG codebase
I have been a coder of C/C++ for 3 years, but I stopped using it for 3 years. I've re-read a book of mine, and I can build with C just fine. I understand it perfectly.
My issue is that to get back into the swing of things, I've taken on a pretty simplistic project for SMAUG codebase, which is obviously based in C. In a nutshell, this would be to create a command 'haggle' that would allow a player to 'haggle itemname price' and based on int/cha/lck and some randomization allow the player to either get a lower shop price on that item (for the rest of the shop's hours), or to fail and have ALL store prices go up for the rest of the store's hours.
My problem isn't constructing this in C. My problem is that I have to reference a number of functions to get information from them in order to do this. Character statistics, etc plus the shop commands to update. I'm not sure if this is really a question more than frustration.
If I started from scratch, the simple mathematics of it would be fine. Referencing other functions that are pretty large and confusing to me is my problem, and I'm finding myself unable to really construct it to pull those variables and "do" the command.
Could someone maybe give me a shell on how I might construct this? Feel free to use imaginary function names etc, just so I have an idea of maybe how to approach this better. I think my approach is overwhelming and I'm diving in the middle of the SMAUG codebase