Page 1 of 1
Fixing scripts
Posted: Thu Sep 18, 2003 11:24 pm
by matt_moh
Is there any tool that can find and pinpoint errors in a script? It gets very annoying running a map and not having the script work because of a syntax error, and then having to look over the entire script to find the problem.
Posted: Fri Sep 19, 2003 4:21 am
by Random
Well i cant say i know alot about scripting but i have noticed in the script editor that comes with Mohaa Tools that a color system is used. If you use the wrong "syntax?" than you will have the wrong color. Sorry i cant be much more pinpoint than that but it has helped me once or twice.
Hope this helps somehow.
Random
Posted: Fri Sep 19, 2003 6:21 am
by jv_map
Just watch your console (~ key). Scroll up a lot and it'll tell you exactly what's wrong with your script.
Make sure you have enabled console in advanced options

Posted: Fri Sep 19, 2003 6:47 am
by Random
jv_map wrote:Just watch your console (~ key). Scroll up a lot and it'll tell you exactly what's wrong with your script.
Make sure you have enabled console in advanced options

Um yeah that works too sometimes i guess

log
Posted: Fri Sep 19, 2003 9:03 am
by tltrude
You can make a log of the console too. Just type this in the console before you load the map.
logfile 1
It will make a file named qconsole.log in main, and it can be opened with notepad. Script errors will be near the top of the page.
Posted: Fri Sep 19, 2003 5:33 pm
by The Jackal
I got a not so funny story about scripting and debugging with Notepad.
I had compiled a series of scripts into one scr file, that was about 3 pages long. One of the threads was for landsharkers. Somehow I inadvertently pressed a SPACE while copying the scripts over, and inserted a space between one of the YZ origins.
I swear, I went crazy trying to figure out what was wrong with the file. Because of this error the entire script file was a dud. I ran though each thread checking my syntax. Everything was perfect. Or so I thought.
I think it took me 2 days of insane searching before I finally found it. I am still under-going therapy for that trauma.
A pal of mine send me a C++ script debugger. I am dumb as to how to use it. Does anyone know how to debug the debugger?

Posted: Sat Sep 20, 2003 12:12 am
by matt_moh
Ok thanks guys, that should make scripting alot easier.