Old 30th August 2005, 12:46   #1
BioDuo
Junior Member
 
Join Date: Jun 2005
Posts: 21
Bug or error in script ( IntCmp)

Well for some reason, yet unknown to me.
The following script will jump each time to "install"
is it a bug in IntCmp that it can't reconise a '.' in it
or is it something else?

Function .onInit

StrCpy $0 "1.64"

IntCmp $0 1.65 install old 0
IntCmp $0 1.71 install 0 new

old:
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_TOPMOST|MB_DEFBUTTON2 "Older version" IDYES install
Abort

new:
MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_TOPMOST|MB_DEFBUTTON2 "Newer version" IDYES +2
Abort

install:
FunctionEnd
BioDuo is offline   Reply With Quote
Old 30th August 2005, 14:33   #2
Pidgeot
Senior Member
 
Pidgeot's Avatar
 
Join Date: Jan 2002
Location: Denmark
Posts: 136
Int signifies an integer. Since your numbers have decimals, they're not integers, and IntCmp won't work.

You should be able to use StrCmp instead.
Pidgeot is offline   Reply With Quote
Old 30th August 2005, 18:32   #3
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
No, those are version numbers. There are functions in the wiki that compare between version numbers, but I can't access the wiki right now to indicate them to you.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump