finaltidus
New member
I have a small question about some code that isn't working the way I want it too. I just can't see the issue so hopefully someone else can.
I have a script that checks for historical pricing and will mall search only if either of them are over 3 days but for some reason when I use "or", "(historical_age(i) > 3.0 || historical_age(j) > 3.0)" it will always mall search on a new session but if I replace or(||) with and(&&) it works how I would expect. I don't want && though because if something is a month old and another is a day old it still won't search. What am I missing here?
offending block:
	
	
	
		
Here is the entire code if it would help but it isn't much more than what's here: https://pastebin.com/27ziXPKQ
Also I just wrote this because I wanted untradeable candies used in synth first and had no idea how to default use them in mafia, and it's good practice I guess
				
			I have a script that checks for historical pricing and will mall search only if either of them are over 3 days but for some reason when I use "or", "(historical_age(i) > 3.0 || historical_age(j) > 3.0)" it will always mall search on a new session but if I replace or(||) with and(&&) it works how I would expect. I don't want && though because if something is a month old and another is a day old it still won't search. What am I missing here?
offending block:
		Code:
	
	foreach i in complexCandy{
	foreach j in complexCandy{
		if((i.to_int() + j.to_int()) % 5 == 0){
			if(item_amount(i) < 1 && !is_tradeable(i)){
				continue;
			}
			if(item_amount(j) < 1 && !is_tradeable(j)){
				continue;
			}
			if(historical_age(i) > 3.0 || historical_age(j) > 3.0){
				mallPrice1 = mall_price(i);
				mallPrice2 = mall_price(j);
			}else{
				mallPrice1 = historical_price(i);
				mallPrice2 = historical_price(j);
			}
			totalPrice = mallPrice1 + mallPrice2;
			if(totalPrice < currentPrice){
				currentPrice = totalPrice;
				candy1 = i;
				candy2 = j;
			}
		}
	}
}
	Here is the entire code if it would help but it isn't much more than what's here: https://pastebin.com/27ziXPKQ
Also I just wrote this because I wanted untradeable candies used in synth first and had no idea how to default use them in mafia, and it's good practice I guess