It is not a weird error, the code has a Syntax Error. Maybe you can see the issue better this way?
(
(coalesce(likes_received,0) * 2)
+ (coalesce(replies,0) * 1)
+ (coalesce(badges1,0) * 3)
)
+ (coalesce(badges2,0) * 2)
)
+ (coalesce(badges3,0) * 1)
) as total_points