• Disabling Baddon
    13 replies, posted
garry, please provide a way to disable baddon. I create modules that sometimes crash, and it's really annoying to have to restart gmod twice to get my module to load again.
I've noticed this, I do think there should be a way to disable it.
Just remove bad_addon.txt in garrysmod/ directory.
A file by the name of bad_addon.txt doesn't exist anywhere in my garrysmod folder. 1000th post.
Then garry has done something wrong. lua/menu/baddon.lua [lua]language.Add( "BADdon", "Bad Addon" ) local function ShowBadAddon( name ) Derma_Message( string.format( [[The game has recently crashed during execution of the module "%s". It has been disabled during this session.]], name ), "#BADdon" ) end if file.Exists( "bad_addon.txt", true ) then ShowBadAddon( file.Read( "bad_addon.txt", true ) ) end local function menu_badaddon( ply, cmd, args ) local name = args[1] or "BADdon" ShowBadAddon( name ) end concommand.Add( "menu_badaddon", menu_badaddon )[/lua]
The message doesnt even pop up, but it does refuse loading the module
Damn it i don't think it will work, oh well.
TBH I don't think baddon is doing any good anyway, so I'm going to remove it completely.
[QUOTE=garry;25675851]TBH I don't think baddon is doing any good anyway, so I'm going to remove it completely.[/QUOTE] Perfect, thanks.
What was the point of it, if I may ask?
To keep malfunctioning modules from overtaking your gmod.
Ah, I don't think I've even heard of a single case of that happening.
To get an example, put this DLL in lua/includes/modules : [url]http://solidfiles.com/d/70fc/[/url] (source: [url]http://pastebin.com/zkXW5MhE[/url]) and go in a singleplayer game and type in the console: [code] lua_run_cl require 'crash' [/code] The game will instantly crash. Start it up again, go in singleplayer or whatever again, and run the lua_run_cl again. The game won't crash this time because require magically remembers which modules crash, and prevents them from loading next time. This is very inconvenient for developing modules which might crash, because you have to restart your game twice to get the module loaded again every time it crashes.
Ok, I get it. Thanks! :smile:
Sorry, you need to Log In to post a reply to this thread.