File not loading

So i have a file by the name sh_meta.lua, its just meta functions for other groups returning true if they are trusted admin and stuff, so in order for the file to run i put in my cl_init > include(“sh_meta.lua”). Mind you im running 2.4.3 and i was just wondering why it doesn’t seem to be loading

Where did you place the file? Should be lua/autorun/ since it is shared

If you put files into:

lua/autorun/client/ – CLIENT
lua/autorun/server/ – SERVER
lua/autorun/ – SHARED

or

addons/<addon_name>/lua/autorun/client/ – CLIENT
addons/<addon_name>/lua/autorun/server/ – SERVER
addons/<addon_name>/lua/autorun/ – SHARED

You do not need to use include or AddCSLuaFile. If you make a sub-directory, then you will…

Alright ill check that out

[editline]19th June 2014[/editline]

I seem to have some other problems, but cant seem to figure out why, like chat commands that just wont work

[editline]19th June 2014[/editline]

I have a command for /admin and it gives this error:


 Lua Error: [ERROR] gamemodes/darkrp/gamemode/server/main.lua:1936: attempt to concatenate field 'report' (a nil value) 1. DoSayFunc - gamemodes/darkrp/gamemode/server/main.lua:1936 2. unknown - gamemodes/darkrp/gamemode/server/chat.lua:89

I dont know what this error means or how i can fix it, any help?

Here’s how I do chat commands: https://dl.dropboxusercontent.com/u/26074909/tutoring/chat_commands/chat_commands.lua.html

SERVER side file. !commands are allowed to show in chat, and /commands aren’t. They link directly to concommand.Add( “commands” … so it is easy to set up.

The error says you’re attempting to concatenate ( join together, such as two strings “blah” … “blah” ) report ( field, so it may be part of a table ) on line 1936 of main.lua called from chat.lua on line 89

Well there are chats in the main.lua like ooc so why would it be doing this with custom chats

Show us the code… Did you edit the core files of DarkRP? We need more to go on to help you.

DarkRP Help Thread ( ALL DarkRP Questions go here ): http://forum.facepunch.com/showthread.php?t=1249475

This code worked perfect on another server and i have no clue why it wont work on my new one, the code is located at the bottom of main.lua in server folder


local function NewReportChat(ply, args)
	if args == "" then return "" end
		local DoSay = function(text)
		if text == "" then return end
			for k,v in pairs(player.GetAll()) do
				local col = team.GetColor(ply:Team())
					if v:IsAdmin() or v:IsMod() then GAMEMODE:TalkToPerson(v, col,LANGUAGE.report.." "..ply:Nick(), Color(200,0,255,255), text, ply)
					end
			end
		ply:ChatPrint( "Your report has been sent." )
		end	
	return args, DoSay
end
AddChatCommand("/admin", NewReportChat, 1.5)
AddChatCommand("/report", NewReportChat, 1.5)