ˇhmm interesting. I tested it this way. It's actually a little modification to my reload() function.

Code:
function reload()
{
cartridge = arr[g_type][1]; //assign a value from array to predefined var
   if (cartridge > 0) //Test this value
   {

   add_on = (arr[g_type][0] - bullets); //calculate add on

      if (cartridge < add_on)
      { 
      add_on = cartridge;
      }
      
      cartridge -= add_on;
[..]



NOW, if I change arr[g_type][1] f.i 56 and arr[g_type][0] to 5, resulting:

Code:
[...]
cartridge = 56; //assign a value to predefined var
   if (cartridge > 0) //Test this value
   {

   add_on = (5 - bullets); //calculate add on

      if (cartridge < add_on)
      { 
      add_on = cartridge;
      }
      
      cartridge -= add_on;
[..]



, everything Works! I assume that array values aren't taken.
tested in that way too:

Code:
STRING* str_addon = "";

TEXT* dbg_count =
{
   pos_x = 0;
   pos_y = 100;
   string("add_on: ", str_addon);
   flags = SHOW;
}

function main()
{
[..]

   while(1)
   {
   [..]
   str_for_num(str_addon, arr[0][1]); // directly trying to get value! the result should be 30
   }

[..]
}



BUT the showed string is still 0!


New into Gamestudio and eager to learn it..
Stuff and games done in 2D: LINK