For my Situation...
Im working with the Free Edition.
I have some Gun Objects. One of them is named "Pistol" it has instance variables in it so i can access my Array with them.
Pistol.WeaponID = 0
Pistol.ClipSize = 1
Pistol.currentAmmo = 11
i have an Array with weaponstats in it.
Array.Width = 12
Array[0,1] = 6 ==> Size of the Clip of that weapon
Array[0,11] = 6 ==> Ammount of Ammo inside that Clip/Weapon
When i start my game the array is getting intialized with values like i want.
When i shoot my weapon (the first time) it substracts 1 from Array[11] until empty or getting reloaded.
But when i reload im doing:
Array --> Set value at(Pistol.WeaponID, Pistol.currentAmmo) to Array.At(Pistol.WeaponID, Pistol.ClipSize);
So i want to put the value at Array[0,11] to the value that is stored in Array[0,1]
so that i have a full clip again. well the first time i reload it does exactly this.
But its doing something else (too)... My Programm is setting Pistol.currentAmmo to "1" (thats the index of Pistol.ClipSize)
Why?
If u have any questions to understand my issue please let me know.
Thx