Jump to content
Novak

Loading Prices from an array

Recommended Posts

null

no comprende?

sorry if i dont understand or something....



//work out how many ints you have than


string[] ItemNames = new string[] {"one", "two", "three"};
int amount = ItemNames.length;
int[] ItemValues = new int[amount];

for(int counter = 0; counter < ItemValues.length; counter++){
  ItemValues[counter] = lookup(ItemNames[counter]);

}


then later just call the prices

int blah;

blah = ItemValue[requiredvalue] * amount of stuff;
Edited by Isolate
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...