"Lvalue required" means you cannot assign a value to something that has no place in memory. Basically you need a variable to be able to assign a value.
in your particular case I would remove a>g=a:g=b
and replace it with something more comprehensible, because in the current state nobody (including you and your compiler) has any slightest idea what that's supposed to be.