What's wrong with my code?
#2
i think you have to change local OtherPlayer = OtherPlayer:GetName() to
local OtherPlayer = Split[2] since OtherPlayer is a nil value but i'm not sure.

Maybe cRoot:Get():FindAndDoWithPlayer(Split[2], functionhere) works. like this:
local dowithplayer = function(OtherPlayer)
   OtherPlayer:TakeDamage(100, OtherPlayer)
end
if cRoot:Get():FindAndDoWithPlayer(Split[2], dowithplayer) == false then
    Player:SendMessage( "Player not found" )
else
    Player:SendMessage( "Player " .. Split[2] .. " is killed")
end
EDIT:
Not sure if it works though.
Reply
Thanks given by: tonibm19


Messages In This Thread
What's wrong with my code? - by tonibm19 - 04-28-2013, 09:04 PM
RE: What's wrong with my code? - by NiLSPACE - 04-28-2013, 09:46 PM
RE: What's wrong with my code? - by xoft - 04-28-2013, 11:40 PM
RE: What's wrong with my code? - by tonibm19 - 04-29-2013, 04:14 AM
RE: What's wrong with my code? - by NiLSPACE - 04-29-2013, 04:20 AM
RE: What's wrong with my code? - by tonibm19 - 04-29-2013, 04:24 AM
RE: What's wrong with my code? - by xoft - 04-29-2013, 04:38 AM
RE: What's wrong with my code? - by tonibm19 - 04-29-2013, 04:41 AM



Users browsing this thread: 3 Guest(s)