Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Assign an Integer Value to a Variable (http://forums.winamp.com/showthread.php?t=270752)

neil.benn 6th May 2007 20:36

Assign an Integer Value to a Variable
 
Hello,

This is gonna seem like a really stupid question but here goes. I have a variable I have defined say var MY_COUNTER. I have worked out how to add 1 to it by using IntOp. However what I cannot work out how to do is to set it to a particular number, say 5685 or 6457, etc.

Err, this is gonna sound stupid but how to I do that? Sorry to ask such a basic question but I cannot find an answer in the docs, web search or anything!!

Thanks in advance.

Cheers,

Neil

Red Wine 6th May 2007 21:04

Either you mean StrCpy $MY_COUNTER 6457 or I'm completely confused. :)

Anders 6th May 2007 21:15

In nsis, all variables and registers (and the stack) are strings internally, so when you use IntOp the string is converted to a number and back

neil.benn 6th May 2007 21:17

Hello,

That's it understand now - thanks. I was not using strcpy because I wanted to assign an int - not a string. However if everything is a string inside and strcpy works then I understand.

Thanks fro your help.

Cheers,

Neil


All times are GMT. The time now is 06:11.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.