View Full Version : Newbie - increment a build number and write to a text file.

05-20-2004, 04:10 PM
I know I'm making this harder than it should be so I hope someone can set me straight.

Goal - read a build number from a text file, increment the number, write the new number back to the file.

Status - I started a new project and modified an example script using the OpenFileMode function. It work great.
~~~~~~~~~~Dark clouds roll in~~~~~~~~~~~
When I add the script to the existing setup file in the main project, I get warnings that two of the existing functions in the main script are defined but not called. The script that I wrote and added to the end runs fine.

Question - Has anyone run into the issue of tracking build numbers before? :rolleyes:

05-24-2004, 09:06 AM
How did you add the new function to the existing script? Does running the InstallScript debugger tell you anything?

05-24-2004, 09:39 AM

I've defined the function with a prototype statement and call it from the OnBegin event handler. The function I add runs with no problem but one of the later functions in the prototype list comes up with a w7305 error and an included script dosen't run.

I have several protype functions in a list and they all run with no problem until I try to add another function, then the 7th one in the list fails.

I've also tried runnng this as a separate script using an #include statement at the end of the setup script but I get the same error on the other function and on the script.

thank you,

05-24-2004, 09:41 AM
What if you put the #include statement near the top of your script? I believe a function's prototype has to appear in the script before the first use of the function...

05-24-2004, 10:33 AM

Very strange - when I put the #include <scriptname.rul> at the top of the setup but there was nothing in the script except one function with no arguments or parameters, just an info box, setup ran with no errors.

Then when I added two #define statments to the new script and reran setup, the original error (W7305 on a different function reappeared.)

Also - just as an added strangeness - when this error appears, if I comment out or delete lines added, the error does not disappear, I have to cut and paste in a clean copy of the script.

Thank you,