Archive: Global Variables


Global Variables
Ok It's simple BUT I can't do it

I've got a global variable

Var BLA
Then in one Function
Function "tup"
.........
........
StrCpy $BLA $8
........
FunctionEnd
the variable gets the number from $8
then in other function
Function SetCustom
.........
........
IntOp $BLA $BLA + 10
........
FunctionEnd
But it doesn't work
In the end BLA is 10 - and it must be 725650



Compiler says:
1 warning:
install function "tup" not referenced - zeroing code (0-49) out

The warning means the function "tup" is never called. Call it from somewhere. You probably want to call it from .onInit.


Ok I called it there is no longer a warning - thanks a lot

But there is a problem with the global variable BLA - could you pls see if the comands are right. I'm new to NSIS


If there was something wrong with the commands, you would likely recevied some other type of compile error. But since you're not, it's likely some other logic error. Unfortunatley, your examples are not enough to troubleshoot. If you need more help, you should attach a complete sample script which illustrates the problem.

In the end BLA is 10 - and it must be 725650
Based on your above statement and from the small bit you've provided so far, I'd say that $8 in your first function for some reason is not being set or that the line StrCpy $BLA $8 is being skipped, which then makes $BLA equal to 10 in your second function. (nothing + 10 = 10).

THANK YOU ALL !!!
Now I've got a new problem - I think it's not so hard to solve it but I can't

I've got the variable $POM($POM=10) and I want the variable to be written on one of the pages - here is an example:
http://img144.imageshack.us/img144/932/sahh3.jpg


WriteINIStr or MUI_INSTALLOPTIONS_WRITE.

Stu