thegrb93 / StarfallEx

Starfall, but with active development and more features. Write Garry's mod chips similar to E2, but in lua
https://discord.gg/yFBU8PU
Other
199 stars 111 forks source link

Hook 'render' errored with: addons/scb-20/lua/scb/cl_util.lua:132: Regex is too complex! 5 ext search length too long (40 max) #1240

Closed troit5ky closed 2 years ago

troit5ky commented 2 years ago

ver. = 4.5 (Release)

Error on printTable() and print() only on 4.5 ver. 4.4 haven't that problem

[notify]: Hook 'render' errored with: addons/scb-20/lua/scb/cl_util.lua:132: Regex is too complex! 5 ext search length too long (40 max) 
stack traceback:
    addons/scb-20/lua/scb/cl_util.lua:132: in function 'find_url'
    addons/scb-20/lua/scb/vgui/scb_chat_line.lua:590: in function 'Parse'
    addons/scb-20/lua/scb/cl_overrides.lua:143: in function 'AddText'
    addons/starfall/lua/starfall/libs_sh/builtins.lua:576: in function 'print'
    addons/starfall/lua/starfall/libs_sh/builtins.lua:413: in function 'printTableX'
    addons/starfall/lua/starfall/libs_sh/builtins.lua:595: in function 'printTable'
    SF:vizual.txt:37: in function <SF:vizual.txt:32>
Vurv78 commented 2 years ago

This is because ever since release 4.5 lua pattern functions have been nerfed since they can easily lag/crash your game. Starfall has to edit the string metatable in order to keep everything sandboxed, which ends up affecting other addons if they use the (""):foo() format versus string.foo("").

Since this addon scb-20 overrides chat.AddText it's not very viable to fix here (Why does this detour exist anyway..)

So either

troit5ky commented 2 years ago

waiting for Rubat...