Probably a really simple problem.
Code:
if(Arrowkey == ENTERKEY)
{
bool Check = ItemBuyBox(Itemarray[Arrowkeyplace]);
if(Check == false)
{
BuyBoxClear();
}
else if(Check == true)
{
BuyItem(Itemarray[Arrowkeyplace]);
}
}
No matter how i look at this i am unaware of how it always takes the first if regardless of what the function returns to check. It also takes both ifs if the second one isn't else. Im really unsure why this is happening :/
If i just put TRUE or FALSE it works fine :/
Code:
else if(Arrowkey == ENTERKEY)
{
switch(Arrowkeyplace)
{
case 0:
{
return true;
}
case 1:
{
return false;
}
}
}
This is the code that returns the BuyBox function.
If i get it to return the value to cout it outputs
184 for both true and false :/