on *:part:%room: works perfectly fine here.. remove the space between the variable and the : i guess. nevertheless, on *:part:$(%room): will work aswell

/edit: your workaround is missing a closing } after the return.