Place this at script's begin to include LogicLib functions:
!include "LogicLib.nsh"
Please read LogicLib for more information.