[REQUEST]How-To

Squintz

Senior Member
I'v seen scripts such as electrons custom weather script wich seem to use some advance debuging techniques. I was wondering if someone could explain the diferent techniques that can be used to debug scripts. I like the fact that electron can turn his script on by passing a certain string to the sub main. Can you explain how this is done. When i try to figure it out by looking though your code i get lost and can't make out how it works.
 
most of my scripts support the 'd' parameter, i.e. customer_weather.txt("main","d"), and it will print out every important step it does, nothing fancy, but useful sometimes. I believe custom_weather doesn't support it tho because I hardcoded the mode (remove the strMode = 1 line) unless you change it, then call it using "1d".
 
Electron,

It doesnt apear that you are using If statements all over your code to determine if the mode paramater is set to d... So how does it detect if the mode is d or not?

P.S. Im not looking at the code now, im only recalling this from memory.
 
the debugprint function checks if a certain booleable has been set to true, which is done in the first few lines of the main() sub.
 
Back
Top