1LoL1 Posted October 14, 2015 Share Posted October 14, 2015 Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"? function d (player, cmd) outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) ERROR: attempt to concatenate local "cmd" (a nil value) Link to comment
LoOs Posted October 14, 2015 Share Posted October 14, 2015 Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"? function d (player, cmd) outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) ERROR: attempt to concatenate local "cmd" (a nil value) Test :# function d (cmd) outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) The source of this event is the player who tried to execute a command Link to comment
1LoL1 Posted October 14, 2015 Author Share Posted October 14, 2015 Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"? function d (player, cmd) outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) ERROR: attempt to concatenate local "cmd" (a nil value) Test :# function d (cmd) outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) The source of this event is the player who tried to execute a command no your script is wrong but thanks i fixed. function d (cmd) local f = getPlayerName(source) outputChatBox("Player "..f.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) Link to comment
LoOs Posted October 14, 2015 Share Posted October 14, 2015 Hello i created this script but i have 1 error can anyone fix this? or i must define "cmd"? function d (player, cmd) outputChatBox("Player "..player.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) ERROR: attempt to concatenate local "cmd" (a nil value) Test :# function d (cmd) outputChatBox("Player "..source.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) The source of this event is the player who tried to execute a command no your script is wrong but thanks i fixed. function d (cmd) local f= getPlayerName(source) outputChatBox("Player "..f.." --> "..cmd.."", getRootElement(), 255, 255, 255, true) end addEventHandler("onPlayerCommand", getRootElement(), d) LooL i Forgot Name Player , put easy , Let the other in time to the wiki , to alert Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now