Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   LogicLib help (http://forums.winamp.com/showthread.php?t=269520)

Joel 14th April 2007 02:03

LogicLib help
 
I'm trying to convert this C style code:
PHP Code:

if ( (someVal != 0) || (someVal VERSION) ) {
//... give outhandle = 1
}
elseif ( (
someVal != ) || (someVal == VERSION) ) {
// ... give outhandle = 2


And this gives me error "_If" requires 4 parameter(s), passed 8!:
PHP Code:

${IF} $R0 != ${OR} $R0 < ${VERSION}
StrCpy ${outHandle1
${ELSEIF} $R0 != "" ${OR} $R0 = ${VERSION}
StrCpy ${outHandle2
${ENDIF} 

Any help?

demiller9 14th April 2007 02:38

PHP Code:

${IF} $R0 != 0
${ORIF$R0 < ${VERSION}
StrCpy $outHandle 1
${ELSEIF} $R0 != "" 
${ORIF$R0 = ${VERSION}
StrCpy $outHandle 2
${ENDIF} 

You might also find that you need quotes around the $R0 operands.

$outHandle should be declared with 'Var'. ${outHandle} is declared with '!define' and probably won't let you StrCpy to it.

Don

Joel 14th April 2007 15:03

Thanks for the tips, demiller9

and $outHandle is declared as Var ;)


All times are GMT. The time now is 04:58.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.