Code:
void copy(Items &A, Items B)
{
ID.A = ID.B;
mainClass.A = mainClass.B;
subClass.A = subClass.B;
strReq.A = strReq.B;
chkReq.A = chkReq.B;
quality.A = quality.B;
bonding.A = bonding.B;
price.A = price.B;
stackSize.A = stackSize.B;
primDmg.A = primDmg.B;
sconDmg.A = sconDmg.B;
resist.A = resist.B;
bnsOpt.A = bnsOpt.B;
name.A = name.B;
desc.A = desc.B;
attSpeed.A = attSpeed.B;
defSpeed.A = defSpeed.B;}
void Buy(int jjj)
{
for (int iii=0; iii!=MAX_INV; iii++)
if (charInv[iii].ID==0){ copy(charInv[iii],itemsDB[jjj]); break;}
else if (charInv[iii].ID==itemsDB[jjj].ID)
if (itemsDB[jjj].amount < itemsDB[jjj].stackSize){ itemsDB[jjj].amount++; break;}
}
is it ok like that?
nvm the ".A" and ".B" i just noticed it myself, ill go and fix it (complier didn't give me an error for some reason)