After you hit the perk button, press shift+0, find something similar to "Response: "+response+"/nWarn: "+warn" and paste here what the game printed. Maybe you can put another iprintln before the "if" to make sure the script is runs.
Oh, and comment or delete these two lines:
PHP Code:
wait 0.5;
self setClientCvar("perk_warn",""); 
I think there is no man in the world who can read the warn message in half second.