I got a simple Question and weird from passing value to data type class variable.
the code like below :
void AddItem(int ID) {
for (int i = 0; i <
In your constructor:
this.baseName = folder + "/"; // if folder = "Corps/Lemon" from database.items[i].itemIcon
itemIcon = this.baseName + itemName; // it will update itemIcon to "Corps/Lemon" + "/" + "Lemon"
Did you get it now??
You may want to assign itemIcon
value directly instead of doing all this.
Do this in your constructor :
itemIcon = folder;
Cheers
In item
constructor you are doing it:
this.baseName = folder + "/";
itemIcon = this.baseName + itemName;
where folder == Corps
and this.baseName == "Corps/Lemon/"
and itemName == "Lemon"
so you have exactly what you should get.