>What does the commandline function in the blitz3d editor
>do?
It enables you to test your program, if your program uses commandline arguments.
>Can it be used to link documents or applications to the
>blitz editor?
No.
>Why would you use the Comand line? Or why would you need
>to specify a command line to pass to an application?
You use commandline arguments to specifiy options which may be unnessesary for the average user or are very specific in nature.
For example, you could use commandline arguments to test a users system and record errors. game.exe would run your program as normal, but game.exe -debug would create an error log and log every action until the game crashes. This would enable you the developer to figure out what the problem might be.
>In your example above, it returns debug as a variable but
>I don't see anything else happening. If debug mode is un-
>checked the program still runs in normal mode. So whats
>the difference between this and readfile?
Readfile requires that the program either automatically reads an external file, or is prompted by a user to do so. That is not always desirable.
>Do you have any acual working examples I could look at?
>That would help a bunch.
Any game will incorporate some attempt at detecting problems. Let's say that your program uses a fancy algorith, which is based on a slower and less secure algorithm which you used in previous versions of the program.
naturally you would like to ensure that the user aways uses the new algorithm, but just incase there may be problems which you havent found while testing, you leave the old algorithm in the program and enable it to be turned on using a commandline argument.
So you start selling the new version and after a few days you receive an email reporting unexpected results using the new algorithm.
You then tell the customer to run the program with the args 'oldalgo'. He replies that this corrected the problem.
Now you know that there is a problem with the new version of the algorithm, so you need to know where in the program the problem is. You tell the customer to run the program with the arg 'dump', which will write the contents of every variable and type to file as they change, and then send it to you via email.
The customer does so and you are able to find and fix the problem.
In the above example you had had to args 'oldalgo' which made the program use your older algorithm and 'dump' which dumped the variables to file. This is a very simple explanation, but you should be able to see why args are useful.
Andy
>do?
It enables you to test your program, if your program uses commandline arguments.
>Can it be used to link documents or applications to the
>blitz editor?
No.
>Why would you use the Comand line? Or why would you need
>to specify a command line to pass to an application?
You use commandline arguments to specifiy options which may be unnessesary for the average user or are very specific in nature.
For example, you could use commandline arguments to test a users system and record errors. game.exe would run your program as normal, but game.exe -debug would create an error log and log every action until the game crashes. This would enable you the developer to figure out what the problem might be.
>In your example above, it returns debug as a variable but
>I don't see anything else happening. If debug mode is un-
>checked the program still runs in normal mode. So whats
>the difference between this and readfile?
Readfile requires that the program either automatically reads an external file, or is prompted by a user to do so. That is not always desirable.
>Do you have any acual working examples I could look at?
>That would help a bunch.
Any game will incorporate some attempt at detecting problems. Let's say that your program uses a fancy algorith, which is based on a slower and less secure algorithm which you used in previous versions of the program.
naturally you would like to ensure that the user aways uses the new algorithm, but just incase there may be problems which you havent found while testing, you leave the old algorithm in the program and enable it to be turned on using a commandline argument.
So you start selling the new version and after a few days you receive an email reporting unexpected results using the new algorithm.
You then tell the customer to run the program with the args 'oldalgo'. He replies that this corrected the problem.
Now you know that there is a problem with the new version of the algorithm, so you need to know where in the program the problem is. You tell the customer to run the program with the arg 'dump', which will write the contents of every variable and type to file as they change, and then send it to you via email.
The customer does so and you are able to find and fix the problem.
In the above example you had had to args 'oldalgo' which made the program use your older algorithm and 'dump' which dumped the variables to file. This is a very simple explanation, but you should be able to see why args are useful.
Andy