DOS Programming Problem
#1
Posted 11 November 2014 - 02:00 PM
#2
Posted 11 November 2014 - 02:27 PM
BWP has the listing of mods builtin... why reinvent the wheel?
I'd advice to open a cmd-window, use the @echo on-switch in your script, run it from the opened window and see what's the last thing that's written. Or use a simple editor that supports running dos-batches and print the output in its own text-panel.
Sometimes those things are stupid stuff like comments in an if-clause or wrong syntax.
Edited by dabus, 11 November 2014 - 02:29 PM.
#3
Posted 11 November 2014 - 03:10 PM
Thanks dabus:
I am using V14.1 with the order from V14.2. So it goes to the screen but not to a file. I have managed to use List.bat to send it to a file, but just recently it quit working. The other thing I do is send copies of the .log and .err files to another folder because BiG World Cleanup.bat deletes them.
I have looked through 12 sites so far and have not got a hint. But I have learned lots of DOS secrets. It is frustrating but fun. And I have tried the the @Echo On trick. It is just that there is nothing showing up for what is happening. I did have some misspellings, but I assume I got all those and all the typos. It just bugs me that I cannot fix this.
Thanks again for your advice,
Tom
#4
Posted 11 November 2014 - 03:48 PM
Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit).
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.
#5
Posted 11 November 2014 - 05:00 PM
Thanks The Imp:
Between dabus and you you did trigger some more thoughts. They led me to finding the problem.
Whenever I use GOTO statements, I check the labels. I have 5 GOTOs in the file and I did check to see that the labels were correct when I first wrote them. However, somehow I accidentally typed another character in one label. Any time you have a GOTO statement where it cannot find its label, it will search until it reaches the last line in the file. Then it closes the program. I spent 5 hours chasing this down in a 30 line program. It ain't fun getting old.
I guess the old carpenter adage that you measure twice before you cut once is very good advice. I should have check that a second time when the program did not work.
Thanks again for the comments,
Tom
Edited by tomkaz, 11 November 2014 - 05:01 PM.
#6
Posted 11 November 2014 - 05:31 PM
You're not the only one suffering from old-age code-blindness. I've wasted four hours today chasing an onscreen drawing failure (non-IE) in some C-language code, only to finally find that I'd mistyped the resource name and then (while troubleshooting) b*llixed up its resource number too. TG I keep a proper rolling backup...!!
Edited by Yovaneth, 11 November 2014 - 05:32 PM.
'Go for the optics, Chiktikka. GO FOR THE OPTICS!!' - Tali vas Neema
DLTCEP Tutorials Update Page
DLTCEP Tutorials Main Page
Yovaneth's AI Scripts for BG1, BG2-SoA and IWD1
Fishing for Trouble - a quest mod for Shadows of Amn
#7
Posted 11 November 2014 - 06:12 PM
Yes, typos are bad stuff. And you tend to go if you (are on the way to) find them.
Um, these are the calls.
CALL "BiG World Installpack\List.bat" IE
start notepad "BWP existing mods.txt"
-> list existing mods
CALL "BiG World Installpack\List.bat" INE
start notepad "BWP not existing mods.txt"
-> list not existing mods
CALL "BiG World Installpack\List.bat" INI
start notepad "BWP installed mods.txt"
-> list not installed mods
Open Command, go to your BG2-folder and use the calls. Creates some files, use some editor to view them.
I added the start-lines from the BiG World Install.bat, so you could copy those two lines in some other batch if you wanted to.
I guess you tried to run the List.bat from the directory where the files is in (BiG World Installpack). That does not work since the file is started from the main batch, which is located one path "below" the file. So the files that are needed do have a different path when you start from a different directory.
Call-from BG2-dir> file needs a list, here BiG World Installpack\List.txt -> runs fine
Call-from BiG World Installpack> file needs a list, here BiG World Installpack\List.txt -> not found + setups are not here -> fails
Edited by dabus, 11 November 2014 - 06:22 PM.
#8
Posted 11 November 2014 - 07:34 PM
Hi dabus:
Thank you for the information. I will check it out tomorrow as it is now my bed time. I am sure it will help others who want to get that information.
Tom