[release][b]Error Finder[/b]
This is an addon I created that allows you to easily find any errors that are occuring in GarrysMod. This is powered off of Chrisaster's newly released luaerror module that allows for hooking into the lua error system.
[tab]Addon Download:[/tab][url=http://www.garrysmod.org/downloads/?a=view&id=86154][img]http://www.garrysmod.org/img/?t=dll&id=86154[/img][/url]
[tab]Module Download:[/tab][url]http://bit.ly/67oQw1[/url]
Place errorfinder.lua in garrysmod/lua/autorun/client/
Place gm_luaerror.dll (By Chrisaster/Skondra) in garrysmod/lua/includes/modules/
[/release]
Features:
[list]
[*]Detects all errors
[*]Displays the error, filename, line number, time (CurTime), and real time (os.date), and possible file sources of the error (and the specified line of the possible files)
[*]If the error finder window is open, lua error messages will not appear on your screen.
[*]Caches file locations and lines so it won't reload them every time you select an error.
[/list]
Limitations:
[list]
[*]Clientside only (will still detect server errors if you are a listen server host/playing a singleplayer game)
[*]Errors during [b]serverside[/b] gamemode initialization will not be logged
[*]Errors during addon and autorun file loading may not be detected
[/list]
Screenshot:
[media]http://img32.imageshack.us/img32/9963/errorfinder.jpg[/media]
To show the error finder, just type errorfinder in console. It is constantly recording errors whether or not you have this window open.
So this basically takes the errors you would get in the console and puts it in a window?
[QUOTE=Dr Magnusson;19063920]So this basically takes the errors you would get in the console and puts it in a window?[/QUOTE]
Pretty much. It also gets the line of the error and the time that it happened, something the console doesn't give you. It's also easier to go through this rather than wading through all the console logs.
[QUOTE=Nori;19064022]Pretty much. It also gets the line of the error and the time that it happened, something the console doesn't give you. It's also easier to go through this rather than wading through all the console logs.[/QUOTE]
Oh the console gives you a line. Not always the correct one (comments are ignored) but it gives you them.
[QUOTE=Wizard of Ass;19066587]Oh the console gives you a line. Not always the correct one (comments are ignored) but it gives you them.[/QUOTE]
I'm talking about the actual code from the script. Comments aren't ignored either.
where is gm_luaerror
very useful tool if you use luapad
Brilliant work.
Why don't you load it in includes/extensions, won't that make it load before the addons, etc?
[QUOTE=Kill coDer;19121971]Why don't you load it in includes/extensions, won't that make it load before the addons, etc?[/QUOTE]
Hell, use the menu environment.
Hm. I never thought about that.
autorun/server or autorun/client is executed before the gamemode. Proof:
[code]
[ 01/21/10 18:02:35 ] error loading module 'gamedescription' from file 'root\garrysmod\lua\includes\modules\gm_gamedescription.dll':
A dynamic link library (DLL) initialization routine failed.
[ 01/21/10 18:02:35 ] **********************************************
[ 01/21/10 18:02:35 ] **********************************************
[ 01/21/10 18:02:35 ] ********** COULDN'T LOAD GAMEMODE!! **********
[ 01/21/10 18:02:35 ] **********************************************
[ 01/21/10 18:02:35 ] **********************************************
[ 01/21/10 18:02:35 ] [/code]
From my own error log.
It's this:
menu/
extensions/
autorun/
gamemodes/
Anything else.
The reason extensions and utils run before autorun is because they add Lua derived functions to GLua that are required before any other script is loaded in the client. I believe it's what makes the client environment different from the menu.
Along with the extra functions available that aren't added in extensions or util.
Sorry, you need to Log In to post a reply to this thread.