Stats(var/mob/player/M as mob in view())
var/stats="<html><head><title>[M] Stats!</title></head><body bgcolor=black><font color=white><center>Name: [M.name]\
<br>Class: [M.char_class]\
<br>Gold: [M.gold]\
<br>Banked Gold: [M.bankedgold]\
<br>Level: [M.level]\
<br>EXP: [M.exp] / [M.expneeded]\
<br>EXP NEEDED: [(M.expneeded-M.exp)]\
<br>HP: [M.HP] / [M.MAXHP]\
<br>MP: [M.MP] / [M.MAXMP]\</center></body></html>"
Problem description:
The verb is visible in command tab and when clicked everything works fine, however when I right click myself and click "stats" nothing comes up.
As to why your current code doesn't work, you didn't really post enough of it to tell.