16.01.2015, 18:45
I don't understand how your function works, but does that seem to be okay ?
Also note that if you didn't set a pvar it outputs 0, I suggest using a global variable instead of pvars.
Also note that if you didn't set a pvar it outputs 0, I suggest using a global variable instead of pvars.