So for example I want to set a NW int in a function calling another function like this
[lua]
function SetText(ply, cmd, args)
for k,v in pairs(player.GetAll()) do
if args[1] == v then
v:ChatPrint(“hi”)
end
end
end
function Call(ply)
SetText(ply)
end
concommand.Add(“setcall_text”, Call)
[/lua]
But I get
[lua]
attempt to index local ‘args’ ( a nil value )[/lua]
So what I want it to do is send the text to you when you use the command, how would I do that?
(args[1] being the ply part in SetText)