• Attempt to index global 'translate' (a nil value)
    2 replies, posted
Hello. I'm trying to fix up this script for my murder server, and was able to fix most of the errors except for a few, one of them being the error in the title. [code]cl_specdm.lua:57: attempt to index global 'translate' (a nil value) 1. DrawGameHUD - addons/murder spectator deathmatch/lua/cl_specdm.lua:57[/code] I did some searching around and partially found a solution, but I don't quite understand what it is, nor do I know how to implement it. Here is the full cl_specdm.lua in pastebin [url]http://pastebin.com/qKG1JFEd[/url] Here is the problem area: [code] local shouldDraw = hook.Run("HUDShouldDraw", "MurderPlayerType") if shouldDraw != false then local name = translate.bystander local color = Color(20,120,255) if LocalPlayer() == ply && self:GetAmMurderer() then name = translate.murderer color = Color(190, 20, 20) end[/code] Which is at local name... How do I specify translate (which is what I think I have to do) and therefore fix the error? Thanks.
translate = {table of shit, probably players}
Thanks!
Sorry, you need to Log In to post a reply to this thread.