Math equation not working, what am I doing wrong

Hi there,

I am trying to do a simple equation but the terminal is not working it out correctly.

I’m sure its something small I am missing out, please let me know where I am going wrong :slight_smile:


local chipsQty = 3

local chipsPrice = 4.50

local chipsPriceTotal = chipsQty * chipsPrice

print (" Total price is: " chipsPriceTotal)


This keeps printing 0, which obviously is not correct =-/

Try 

print (" Total price is: " , chipsPriceTotal)

or 

print (" Total price is: " … chipsPriceTotal)

Whoops, I meant to put that in the example above. I have found the error though. I hadn’t changed the item quantity, I feel so nooby, been a long day I think its time for rest :slight_smile:

Sure thing! No worries. We’ve all had those moments. Have a good rest.

Try 

print (" Total price is: " , chipsPriceTotal)

or 

print (" Total price is: " … chipsPriceTotal)

Whoops, I meant to put that in the example above. I have found the error though. I hadn’t changed the item quantity, I feel so nooby, been a long day I think its time for rest :slight_smile:

Sure thing! No worries. We’ve all had those moments. Have a good rest.