Dividing two variables

Hi guys, trying to get this to work, not sure if anyone can help but I’m trying to divide two static variables (integers) from separate scripts here.

I get the error: BCE0049: Expression ‘Money.MoneyCount / Prices.CostPrice’ cannot be assigned to.

static var AmountCanBuy : int;

var HasSlots : boolean;

function Purchase (){

if (CoatSlots.CoatSlots < CoatSlots.CoatSlotsMax){

HasSlots = true;

}

if (HasSlots == true){

Money.MoneyCount/Prices.CostPrice = AmountCanBuy;

}

}

AmountCanBuy=Money.MoneyCount/Prices.CostPrice;

left hand side shd be the variable to which you are saving the result. and right hand side the expression that yields result. this is the basics of arithmetic operation.