Script Debugging


Content
ö Main Page
ö Files & Downloads
ö Scripting Page
ö Cheats
ö General CS Info
ö Links
ö Contact Us

Check it out !

The CLQ
Find out where you rank on the Championship League Quake standings.







Debug your Script!

The following is a list of things to check for when having problems with your script or alias.

1. Check your spelling on EVERYTHING! Most errors occur when you have spelled a word differently from one place to another. You can't add a crouch to your alias by typing crooch. Aslso, if you use +/- signs make sure they are in both the alias and the bind.

2. Check your Binds! Open the console and type bind "your key" and hit enter. What does it say? It should tell you what is bound to that key. If it is correct move on. Recheck the spelling when you do this.

3. Check your autoexec! Make sure that you are exec'ing other cfg files properly in your autoexec. This is how to properly exec a fake cfg file called new.cfg:

exec new.cfg

Also, make sure that your autoexec is being exec'ed. Type:

echo
echo -- Autoexec.cfg is loading --
echo

into your autoexec file and save. You should see the line Autoexec.cfg is loading when you join a game.

4. Check your Aliases! In your alias you have to check for several things:

(Quotes, Semicolons, Comments, Waits).

Quotes ~ These follow the name of your alias and end the alias, like:

alias kill "Command1; Command2; Command3"

If you have an extra one in on accident, the alias will end at the second Quotes like the next example will end after Command1:

alias kill "Command1;" Command2; Command3"

Semicolons ~ These separate the commands within an alias. Make sure you have them between each command and extras are not needed.

Example 1 (Normal) ~ alias kill "CMD1; CMD2; CMD3"
Example 2 (Missing Semis) ~ alias kill "CMD1 CMD2 CMD3"
Example 3 (Extra Uneeded Semis) ~ alias kill "CMD1; CMD2;; CMD3;"

Comments ~ These are on scripts to make the game not read a specific line so the developer can add notes or instructions within the cfg file. The "/" is what comments out the line. So if these are put in somewhere on accident, they will cause the game to stop reading that line. So check for errant "/" comments within your script.

Waits ~ Some commands take longer for the game to execute them than others. If you use a couple of these commands in a row, then you will have to add waits between them so the game can complete one command before it has to start another. Caution ~ The more waits you add the longer you will be unable to do anything. Also, one wait is only like approximately an 1/8th of a second, so you normally won't see problems until you add more than 8 in a row. If commands are not executing after other commands, add a few waits between those commands until the problem goes away. Do this last!

5. E-mail Me! Still having problems, e-mail me a copy of your script and I will debug it for you.



Most Common Errors!

1. Overflow Error ~ Your script is too large, break it down into smaller .cfg files and make sure you exec them in your autoexec like the description above.

2. Unknown Command/Command not found ~ You have probably spelled the bind differently than your alias. CHECK! Or, your autoexec or other .cfg files are not exec'ing.

3. Menu doesn't close after buy script ~ Use the +/- Combo. Check my BUYALL Script for a large example. Here is a small example:

alias +buymp5 "buy; menuselect 3; menuselect 1"
alias -buymp5 "slot10; wait; wait; slot10"

bind "x" "+buymp5"

If you use this example for all your aliases you will never have a problem closing the menu. If the menu doesn't close, hold the key down a little longer. The (+) executes what you have in the (+) alias when you press the key and the (-) does the (-) alias when you release the key. In this case the (+) buys an MP5, and the (-) closes the menu.




© 2000 : SxRxRnR




© 2000 : Created by: SxRxRnR - Questions? Comments? Suggestions? Write me or Bite me; 1 SHOT, 1 KILL!


20112