View Single Post
12-21-16, 03:45 PM   #6
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
I would not trust GetItemStats, unless it has been improved recently. It might not take into account things like upgraded items or warforged and instead just use the base stats.

Anyway, the problem is that your variables are immediately out of scope. pcrit etc only exists within their respective if - else scope. Declare the variables outside of the scope, and then assign values to them inside.

Also, if you want to use tostring you need to assign the new value to the variable. It doesn't replace the value in place. Numbers automatically get converted to strings when joining them with a string, however.
__________________
Grab your sword and fight the Horde!
  Reply With Quote