Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th June 2002, 10:10   #1
Schubi
Junior Member
 
Join Date: Jun 2002
Location: Germany
Posts: 8
Send a message via ICQ to Schubi
Filewrite???

I think I have found a error in NSIS. Because I will write a file for 4 sections, this should only write when activ. But wenn all activ than writes some good and some not. (I'm out germany my english not good in grammer.)

section1:
FileOpen $5 $INSTDIR\cstrike\valve.rc a
FileWrite $5 "s_refgain 0.4$\r$\n"
FileWrite $5 "s_verbwet 0.25$\r$\n"
FileWrite $5 "s_distance 60$\r$\n"
FileWrite $5 "stuffcmds$\r$\n"
FileWrite $5 "exec waffenscript\Waffenkauf.cfg"
FileClose $5
section2:
FileOpen $5 $INSTDIR\cstrike\valve.rc a
FileWrite $5 "$\r$\nexec waffenscript\Radio.cfg"
FileClose $5
section3:
FileOpen $5 $INSTDIR\cstrike\valve.rc a
FileWrite $5 "$\r$\nexec waffenscript\Sonstige.cfg"
FileClose $5
section4:
FileOpen $5 $INSTDIR\cstrike\valve.rc a
FileWrite $5 "$\r$\nexec waffenscript\cache\allcache.cfg$\r$\n"
FileWrite $5 "exec waffenscript\cache\cache.cfg$\r$\n"
FileWrite $5 "exec waffenscript\cache\slots.cfg"
FileClose $5

That is not the complete script, this is not the correct kind it to write. Is this correct with the $\r$\n , I can not found a difference of both.

In the file valve.rc is in it:


exec waffenscript\cache\allcache.cfg
exec waffenscript\cache\cache.cfg
exec waffenscript\cache\slots.cfg


For complet script from start to end, please answer.
When only the first section activ than is all ok.
Pleas help.

So must come it out:

s_refgain 0.4
s_verbwet 0.25
s_distance 60
stuffcmds
exec waffenscript\Waffenkauf.cfg
exec waffenscript\Radio.cfg
exec waffenscript\Sonstige.cfg
exec waffenscript\cache\allcache.cfg
exec waffenscript\cache\cache.cfg
exec waffenscript\cache\slots.cfg

The nsi file is attach.
Attached Files
File Type: txt cs-script.txt (11.4 KB, 54 views)
Schubi is offline   Reply With Quote
Old 16th June 2002, 12:27   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
You forgot to use FileSeek to reach the end of the file.
PHP Code:
FileSeek $5 0 EOF 

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
Reply
Go Back   Winamp 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