Expressions Syntax Error

I am tring to make a motor change States for 4 different conditions and keep getting Syntax Error. Could you help me as I do not seem to be able to correct it.

if({Root Container.Group 5.Running}=1,1,
if{Root Container.Group 5.BreakerTrip}=1,1,
if{Root Container.Group 5.Ready}=0,2,0)

Syntax Error on Token:‘BOUND CONST’(Line2,Char38)


Just a guess but try this:

if ({Root Container.Group 5.Running}=1,1,
  if ({Root Container.Group 5.BreakerTrip}=1,1,
    if ({Root Container.Group 5.Ready}=0,2,0)))