Garry's Mod

Garry's Mod

1,320 betyg
Lua Patcher
5
2
4
6
6
3
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Content Type: Addon
Addon Type: Tool
Addon Tags: Build
Filstorlek
Lades upp
Uppdaterades
46.627 KB
20 feb, 2021 @ 23:50
22 maj @ 14:47
62 ändringsnotiser ( visa )

Abonnera för att ladda ner
Lua Patcher

Beskrivning
Formerly known as Piengineer's Lua Repair

This addon fixes the most common Lua errors, but has the potential to cause performance issues. Only use this when addon creators are unresponsive to your error reports.

Developer Note: If you want to just hide the error pop-up, follow this guide. This addon focuses more on fixing broken code.

This is basically only the Lua Error Fixer part of my old Lua and Model Error Fixers addon I made a while back as some people have requested me to separate the Lua Error Fixer from the Model Error Fixer.

What does the addon do?
The addon attempts to redefine Lua rules to prevent Lua errors from showing up by other addons. It does this by having certain Lua operations return an appropriate value instead of throwing an error.

You can think of this addon as providing a set of rules to the interpreter on how to deal with Lua errors before they even happen. As a plus, this sometimes allows broken addons to become functional again!

What can't this addon fix?
This addon does not fix model and texture errors. Try using the !*$%? ERRORS addon for fixing those.

This addon can only fix compiled Lua code. The script file itself must not have any syntax errors or it won't compile and will be invisible to this addon. I can't do anything to fix these, sorry.

Lua Repair also cannot fix errors that contain the phrase "attempt to compare X with number" or "attempt to compare X with string" due to how number and string comparisons are implemented in Lua 5.1. If Garry ever allows __lt and __le metamethods to be invoked for mixed types, this error will become fixed.

Other than the above, there will exist a way for this addon to deal with the error.

I still see Lua errors after installing this addon.
Sadly, each illegal Lua operation must be redefined one by one. If this happens, give me the first line of the error message as well as which addon did it so that I can see what operation Lua was trying to do.

Note that if you don't give me enough information about the error, I might not be able to fix it!

What chatbox is that?
The chatbox addon seen in the screenshots is the old SChat: 3D Chat Addon.

Will this trigger DRM on paid addons?
Maybe. This addon uses unavoidable getmetatable and debug.setmetatable calls for its operations. If the DRM detects the use of these functions then it will be triggered.

I don't trust this, where is your source code?
You can find / download it on my GitHub page[github.com]. You can also download this whole addon from GitHub instead of here if you're crafty enough.



If you like my work, you now have the option to donate on Ko-fi[ko-fi.com] so that I can keep working for another day. Every little bit helps!
Populära diskussioner Visa alla (5)
7
4 maj @ 23:20
Receiving Lua error with sp.zhabite.com/sharedfiles/filedetails/?id=2762448732
coolkidfunnan
2
1
2 apr @ 20:25
VJ SNPCs stuck or having troubles recognize me.
Woody
9
5 apr @ 5:50
Lua Error
Woody
448 kommentarer
Cherrie_The_Shifter ΘΔ 19 timmar sedan 
Hmm yeah sadly this mod dont seem to fix everything but it would be cool if maybe the greater can some how add fixes just for things like stuff down there. Idk if it be possible or if it'd be out of the mods scope wither. But maybe idk im dumb heh. Anyways rhis mod is great and works pretty well ^^
Des_Terminator 22 timmar sedan 
[Common content for military snpcs] Couldn't include file 'autorun\client\vj_menu_plugins.lua' - File not found or is empty (@lua/autorun/client/militarycustomsettings.lua (line 2))
1. unknown - lua/autorun/client/militarycustomsettings.lua:2

This is for a cool aircraft mod thats been broken for awhile now. Its the only mod I found that made really good ai for planes. Is it possible for this to be fixed or is this out of the mods scope?
Райдер 8 maj @ 10:49 
[RTTM ULX Commands] lua/ulx/modules/sh/sh_ulxcmds.lua:43: Tried to use a NULL entity!
1. RemoveEffects - [C]:-1
2. fn - lua/ulx/modules/sh/sh_ulxcmds.lua:43
3. unknown - lua/ulib/shared/hook.lua:109 (x20)

Can you fix it?
Cherrie_The_Shifter ΘΔ 30 apr @ 10:56 
might be cuz that mod was badly made idk. this lua patcher mod works wonders for me a lit almosy anyone else so yeah
ebes 30 apr @ 10:24 
tried this after forcefully trying to reverse engineer sweps from "THE STALKER" gamemode
all the sweps disappeared after I downloaded this
guess that's one way to solve lua problems
Cherrie_The_Shifter ΘΔ 30 apr @ 2:43 
all seems to work good and fine, thank you:3
Piengineer12  [skapare] 21 apr @ 11:00 
@daymilt2004
I've released an update so that the abs of a nil value is 0, try it out now.

@killermonkey75
That's weird, I've tried to make sure that the load order has no effect on whether errors are patched out or not.
Cherrie_The_Shifter ΘΔ 20 apr @ 17:01 
oh really, yeah i dont got this mod at top of mod load order i didnt even know you can change load order, maybe thats why it fixes some mods not other cuz i dont got lua patcher at very top of load list, ill go do and fix that then, cuz this mod is amazing and really works, Anyways Cool, And Thanks:3 (makes alot of sense tho to have it at top to like have it work better, wait am i being dumb by after is that either at very bottm of mod load list or the top sorry if me dumb sometimes)
killermonkey75 20 apr @ 4:58 
an important thing for anyone to remember is that this has to be loaded AFTER the broken addon, so it's best to keep this at the top of the load order. to change the load order of your addons you can right click gmod, go into properties, then workshop, and right click the addon you want to change in the load order.
Cherrie_The_Shifter ΘΔ 19 apr @ 13:49 
oh okay, yeah it might have something to do with some scripts being lost, cuz im not all too good in coding but i kinda have understanding, and it looks like maybe that eeros isnt cuzof this mod, i could be wrong but dont seem like it, and like i ssaid sadly ythis mod cant fix everything