09-11-2011, 04:48
(This post was last modified: 09-11-2011, 08:30 by ChazZeromus.)
Don't know about the ingame script debugger, I can't get that sh*t to work (The mysterious readme located at "raw/scriptdebugger"). But anyways, I found out how to display better syntax errors.
In order for this to work, you need to have the Black Ops Mod Tools installed
Basically you can turn this:
into this:
When you link your fastfile, be sure to include a cfg file that whitelists the "developer" dvar and "developer_script" dvar. If you have the mod tools, you can copy the myWhitelist.cfg from the mod examples into your mod directory and include it in your mod.csv table as
If you can find the copy, you can make it from a blank text file with the following contents:
After linking your fastfile, the mywhitelist.cfg will be linked and you execute the config file in game to enable the dvars in the console using
Then actually enable them by setting them to "1":
If you don't want to be bothered by setting the dvars all the time, you can change the contents of the whitelist config to include the assignments like this:
Hope that helps. Also a small caveat, small passive errors in your scripts that are never detected will be detected in developer mode, such as comparisons and assignments on differing data types like strings, integers and undefines.
If you want to this with no hassle of messing with whitelisting and such and would rather log everything to a file, forget the above and do "/logfile 1"
In order for this to work, you need to have the Black Ops Mod Tools installed
Basically you can turn this:
into this:
When you link your fastfile, be sure to include a cfg file that whitelists the "developer" dvar and "developer_script" dvar. If you have the mod tools, you can copy the myWhitelist.cfg from the mod examples into your mod directory and include it in your mod.csv table as
Code:
rawfile,myWhitelist.cfg
Code:
setmoddvar developer
setmoddvar developer_script
After linking your fastfile, the mywhitelist.cfg will be linked and you execute the config file in game to enable the dvars in the console using
Code:
/exec myWhitelist.cfg
Then actually enable them by setting them to "1":
Code:
/developer 1
/developer_script 1
If you don't want to be bothered by setting the dvars all the time, you can change the contents of the whitelist config to include the assignments like this:
Code:
setmoddvar developer
setmoddvar developer_script
seta developer 1
seta developer_script 1
Hope that helps. Also a small caveat, small passive errors in your scripts that are never detected will be detected in developer mode, such as comparisons and assignments on differing data types like strings, integers and undefines.
If you want to this with no hassle of messing with whitelisting and such and would rather log everything to a file, forget the above and do "/logfile 1"