moderator
moderator copied to clipboard
string.find nil
[ERROR] addons/moderator/lua/moderator/sh_util.lua:29: bad argument #1 to 'find' (string expected, got nil)
- find - [C]:-1
- StringMatches - addons/moderator/lua/moderator/sh_util.lua:29 3. FindPlayerByName - addons/moderator/lua/moderator/sh_util.lua:49 4. OnRun - addons/moderator/lua/moderator/commands/sh_ban.lua:12 5. RunCommand - addons/moderator/lua/moderator/libs/sh_commands.lua:273 6. ParseCommand - addons/moderator/lua/moderator/libs/sh_commands.lua:253 7. v - addons/moderator/lua/moderator/sv_moderator.lua:65 8. unknown - gamemodes/darkrp/gamemode/modules/chat/sv_chat.lua:138
typing !ban provides this error, however when you type !kick you get a message saying: you provided an invalid player.
Also, trying to ban, kick a player through the menu throws an error too:
[ERROR] addons/moderator/lua/moderator/commands/sh_kick.lua:39: attempt to index local 'menu' (a nil value)
- OnClick - addons/moderator/lua/moderator/commands/sh_kick.lua:39
- DoClick - addons/moderator/lua/moderator/derma/menus/cl_players.lua:95
- unknown - lua/vgui/dlabel.lua:232
Edit: Actually this error occurs with a lot of the commands.
Please view fork #24. This should fix the issue you're having.