Archive: LogicLib giving me headaches.


LogicLib giving me headaches.
I keep getting errors using the LogicLib include. (Yes I do actually include it into the code)
Ps. also using WinVer.nsh.

In this function shit goes down:


Function .onInit
${If} ${IsWinXP} ${AndIfNot} ${RunningX64} #32 bit
!insertmacro UnselectSection ${SEC01}
!insertmacro SelectSection ${SEC02}
!insertmacro UnselectSection ${SEC04}
!insertmacro SelectSection ${SEC03}
MessageBox MB_OK "Windows XP"

IfFileExists "C:\Program Files\Data Access Worldwide\Visual Report Writer\2.1\*.*" +3 0
MessageBox MB_OK "Directory does not exists and will now be created."
CreateDirectory "C:\Program Files\Data Access Worldwide\Visual Report Writer\2.1\"
${ElseIf} ${AtleastWinVista} ${AndIf} ${RunningX64}
!insertmacro UnselectSection ${SEC02}
!insertmacro SelectSection ${SEC01}
!insertmacro UnselectSection ${SEC03}
!insertmacro SelectSection ${SEC04}
MessageBox MB_OK "Windows Vista or higher 64 Bit"

IfFileExists "C:\Program Files (x86)\Data Access Worldwide\Visual Report Writer\2.1\*.*" +3 0
MessageBox MB_OK "Directory does not exists and will now be created."
CreateDirectory "C:\Program Files (x86)\Data Access Worldwide\Visual Report Writer\2.1\"
${Else} # Vista or higher 32 bit
!insertmacro UnselectSection ${SEC02}
!insertmacro SelectSection ${SEC01}
!insertmacro UnselectSection ${SEC03}
!insertmacro SelectSection ${SEC04}
MessageBox MB_OK "Windows Vista or higher 32 Bit"

IfFileExists "C:\Program Files\Data Access Worldwide\Visual Report Writer\2.1\*.*" +3 0
MessageBox MB_OK "Directory does not exists and will now be created."
CreateDirectory "C:\Program Files\Data Access Worldwide\Visual Report Writer\2.1\"
${EndIf}
FunctionEnd


Error message:
Function: ".onInit"
!insertmacro: _If
!insertmacro: macro "_If" requires 4 parameter(s), passed 10!
Error in script "C:\Documents and Settings\Yoshi\My Documents\NSIS\Visual Report Writer Developer\VRWD.nsi" on line 115 -- aborting creation process


Am I doing something wrong or what?

if xyz
andif abc


meh ofcourse..

Thanks sir.