Old 24th March 2007, 20:46   #1
Riskov
Junior Member
 
Join Date: Mar 2007
Posts: 5
Global Variables

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

I've got a global variable
Quote:
Var BLA
Then in one Function
Quote:
Function "tup"
.........
........
StrCpy $BLA $8
........
FunctionEnd
the variable gets the number from $8
then in other function
Quote:
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:
Quote:
1 warning:
install function "tup" not referenced - zeroing code (0-49) out
Riskov is offline   Reply With Quote
Old 24th March 2007, 21:13   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The warning means the function "tup" is never called. Call it from somewhere. You probably want to call it from .onInit.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 24th March 2007, 22:28   #3
Riskov
Junior Member
 
Join Date: Mar 2007
Posts: 5
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
Riskov is offline   Reply With Quote
Old 24th March 2007, 23:25   #4
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
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.
Quote:
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).
Comperio is offline   Reply With Quote
Old 25th March 2007, 10:37   #5
Riskov
Junior Member
 
Join Date: Mar 2007
Posts: 5
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:
Riskov is offline   Reply With Quote
Old 25th March 2007, 12:05   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
WriteINIStr or MUI_INSTALLOPTIONS_WRITE.

Stu
Afrow UK 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