That looks as though it should work. There's no error messages? When you click the button, what exactly happens? At this point, I need to know exactly what the error is.
Note: random(6) gives 0-5, so 2d6+1 wound be random(6) + random(6) + 3
http://hlkitwiki.wolflair.com/index....age_Intrinsics
Oh, and if you switch to advanced mode when writing a reply on this forum, there's a "Code" button you can use to present things better.