ItsMods

Full Version: Superior GSC Debugging
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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:
[Image: P82kQ.jpg]

into this:
[Image: pzVuI.jpg]

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
If you can find the copy, you can make it from a blank text file with the following contents:
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"
good tutorial, even though most modders know this, it will help the newbz find errors.


(09-11-2011, 04:56)Nukem Wrote: [ -> ]good tutorial, even though most modders know this, it will help the newbz find errors.



Well runtime script errors will slap you in the face immediately, no need to santa clause your log files to find the errors. Besides, if I had the in game script debugger working, I wouldn't be posting this Tongue
You could just use /logfile 1, it will also show the errors ingame like developer. And you should fix the run time errors anyway. Also the ingame scriptdebugger is just for 3arc. They also stripped it from the exe.


Nice tutorial though ! Smile
Well bummer lol. Let me X out the entire original post Tongue Oh there seems to be a distinction between "/developer 1" and "/developer 2", probably just more added channels for debug information.
(09-11-2011, 08:10)Pozzuh Wrote: [ -> ]You could just use /logfile 1, it will also show the errors ingame like developer. And you should fix the run time errors anyway. Also the ingame scriptdebugger is just for 3arc. They also stripped it from the exe.


Nice tutorial though ! Smile

The orifinal gsc's contain run time errors. 3arc should fix those!
(09-11-2011, 09:52)SuperNovaAO Wrote: [ -> ]
(09-11-2011, 08:10)Pozzuh Wrote: [ -> ]You could just use /logfile 1, it will also show the errors ingame like developer. And you should fix the run time errors anyway. Also the ingame scriptdebugger is just for 3arc. They also stripped it from the exe.


Nice tutorial though ! Smile

The orifinal gsc's contain run time errors. 3arc should fix those!

I never get any...
I get them when I load a map a certain way, with the dreaded 3arc test client.
(09-11-2011, 10:12)ChazZeromus Wrote: [ -> ]I get them when I load a map a certain way, with the dreaded 3arc test client.

probably because you have to wait till _load.gsc is finished running... Like when you make a hud elem with setpoint() it will bug out unless you put a wait .05; in front if it
I know exactly why setpoint fails, hud init for some reason occurs on a thread, just make the main code wait on a custom barrier using notifies. Or just call _hud::init, it's safe to execute it twice. Well that's what I did. Also, the supplied gsc's in the beta tools are outdated, im getting original gsc code errors on lines that don't even exist.
Pages: 1 2