So I've been working on a server for a while and currently I'm struggling with the /warrant and /wanted command as cops/mayor. For some reason the command does not seem to work. Though going into the f4 menu and using the wanted option does work however I'm not able to give a reason there and it just lands on the default "Wanted reason:wanted"
The f4 menu does not bother me as much as being able to use /warrant and /wanted
Any thoughts? I'm really not sure where to start looking and this is my first ever "help" thread that I've made.
Thanks in advance.
Either your darkrp code is broken or you just type the command wrong.
I cant think of anything else right now.
/warrant palabeaver "Aw fuck, here we go again"
https://files.facepunch.com/forum/upload/469093/4c4fa0fb-218b-4cff-894d-03bb8dbf3ae8/image.png
lua/includes/util.lua:204: attempt to index a string value with bad key ('IsValid' is not part of the string library)ServerLog: "Fly<2><STEAM_0:1:30398633><SWAT>" say "/wanted bot stealing"
This error appears when trying to use the command, not sure if it's linked to the problem.
I've tried reinstalling the darkrp gamemode but it still does not seem to work, I've also gone through the addons to see if any of them are messing with the function but that does nothing either.
/warrant <player> <reason> does work now though so it's just /wanted <player> <reason> that's not working.
Ok i found where IsValid is triggered, but before that the name must pass DarkRP.findPlayer() function and maybe, just maybe it somehow returns a string instead of entity or nil.
"gamemode\modules\base\sh_util.lua" line 53
Look at this file. Maybe you will find something.
Sorry, you need to Log In to post a reply to this thread.