Computer Science Canada (RPG) Adding Items to the Inventory - Arrays |
Author: | [Gandalf] [ Fri May 20, 2005 1:29 pm ] | ||||
Post subject: | (RPG) Adding Items to the Inventory - Arrays | ||||
Alright, what I'm trying to do is add items to an RPG game. The problem is, I can't find a way to increase the size of the array so that there is room to add another item later. Here is what I have so far, but when a new item is added it just overwrites the last item in the array.
Am I doing something wrong, or is there some point I still need to learn? Should I be using a dynamic array somehow instead? Any help would be appreciated, I'm getting confused... *Edit* Wait, is it flexible arrays? I'll try looking it up, but some help would still be appreciated. *Edit 2* Ohh, I was right. I finally got it - proud of myself ![]()
|