Facepunch / garrysmod-issues

Garry's Mod issue tracker
147 stars 56 forks source link

Errors in console (Using Q menu) #3997

Closed Potatosayno closed 5 years ago

Potatosayno commented 5 years ago

Details

This one is pretty simple, I am on the DarkRP gamemode (shouldn't matter) and have found out an issue that has occured with a DarkRP feature, ended up being it also happens with the Q menu. This simple trick will cause your console to error.

Steps to reproduce

Garry's mod doesn't like this, and it seemed to happen with a DarkRP search bar as well.

[ERROR] gamemodes/sandbox/gamemode/spawnmenu/toolpanel.lua:31: malformed pattern (missing ']')
  1. find - [C]:-1
   2. OnValueChange - gamemodes/sandbox/gamemode/spawnmenu/toolpanel.lua:31
    3. unknown - lua/vgui/dtextentry.lua:194
ExtReMLapin commented 5 years ago

disable pattern in string.find

https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/gamemode/spawnmenu/toolpanel.lua#L31

https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/sandbox/gamemode/spawnmenu/toolpanel.lua#L42

Or maybe it's a feature and not a bug, maybe he want us to be able to use pattern, but I doubt it

neico commented 5 years ago

This screams for a toggle option, I personally like how the search bar in VSCode looks like (inlined option buttons): VSCode Search

thegrb93 commented 5 years ago

Patterns are useful, but need error handling

thegrb93 commented 5 years ago

Actually for tools pattern is unnecessary.

robotboy655 commented 5 years ago

https://github.com/Facepunch/garrysmod/commit/f822184c3198f9c94416e42b9129fc5cf59a8a2b