It seems that the snippet you are using was written for older versions of yasnippet
because the variable text
was renamed to yas-text
in newer versions, try replacing text
with yas-text
in the snippet.
I case you are not aware you can use yas/tryout-snippet
to quickly try out snippets while editing them.