ItsMods

Full Version: How do you guys check for errors when scripting?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do you guys check your errors when scripting? If i'm scripting something, and I make an error, instead of just seeing "Unknown Function: (See console for details)", how do I see the details?

AgentGOD's Liberation console doesn't show anything.
try to type in console /logfile 2

TLDR:

There are no good gsc syntax checkes.

Why?

Let's see any GSC Code error checker - it will show like 20 errors instead one.... why? Because if one error found - part of code after error will be marked as a lot errors.


I recommend you to use your eyes and find your syntax errors yourself.
Example:
Code:
self giveWeapon("smth_mp); - bad token. you forgot the ""
self giveweapon("smth_mp") - syntax error - you forgot to close line with ';'
giveweapon("smth_mp"); = syntax error (not unkn.func) - you forgot the method caller ( it is not common method )
etc



- What if you will have error kinda Unknown Function?

If you use hardcoded functions like 'giveWeapon' and you want to get them all - you need to create custom code checker and write them all inside ( ~300-400 functions ), or just use memory reader, which can cause ban in your game.

heres some useful sites:
www.zeroy.com/script (Cod4 - mostly works in mw2 also )
Haven't been coding in GSC for a while, but when I was doing it - I was finding errors myself
/logfile 2

and if that doesn't work, you either disable sections of the code until it works so you can point out where the mistake is, or you use the rubber duck method
I thought if you get unknown function it wouldn't tell you what the function is?

Also for 4D1 haters there's a built in syntax crap that tells you what's missing and where it's from.
(06-14-2013, 21:16)DidUknowiPwn Wrote: [ -> ]I thought if you get unknown function it wouldn't tell you what the function is?

Also for 4D1 haters there's a built in syntax crap that tells you what's missing and where it's from.

Dumb Bitch
I used to check it by myself, so I used to code a few lines and then test the mod, if it gave error I knew quickly where the error was.