Error in VSTA Macro(get_Value)

Error in VSTA Macro(get_Value)

I want to check Variable "PZZ1" and if PZZ1=1 then start function "showPopUpScreen1".
I create Macro in VSTA, but I have error in line Vvalue = var.get_Value(0);
Error description:
Error 1 Cannot implicitly convert type 'object' to 'int'. An explicit conversion exists (are you missing a cast?) C:\ProgramData\COPA-DATA\SQL\06a41188-4b9c-4847-823b-a5b0ca862adb\FILES\zenon\system\VSTA\CSharp\ProjectAddin\ThisProject.cs 2612 22 ProjectAddin

C# Code:
public void MacroCheckPZZ()
{ int Vvalue;
zenOn.IRtFunction myFunction = this.RtFunctions().Item("showPopUpScreen1");
zenOn.IVariable var = this.Variables().Item("PZZ1");
Vvalue = var.get_Value(0);
if (Vvalue == 1)
{ myFunction.Start(); }

}


This is a migrated post! Originally posted on 16.02.2012 by user focus. Please be aware that information can be outdated.