1
LUA ERROR: sys/lua/giveitems.lua:3: attempt to index local 'message' (a nil value)
But I could not fix it.
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("say","player_name")
function player_name(p,id,message)
if string.lower(message:sub(1,6))=="!test" then
local playerid = string.lower(message:sub(7))
if (player(playerid) > 0) and (player(playerid) <= 32) and player(playerid,"exists") then
msg("[Player Name: "..player(playerid,"name").."]")
end
end
end
Please can anyone explain it for me?
What are the errors in my script?
1 
Offline
