Expected an expression that can fail in the 'if' condition clause Error

Thanks but I figured it out, I had to initialize a new variable for it to work like this,
AddLife(e:int): int= #Returns the new team index
arg := IsLastLife()
if(arg?):
set TeamIndex += 1
set lives += 1

1 Like