What I did wrong?
[20:01:28] LUA: Plugins/SpawnMob/main.lua:12: attempt to call method 'SendMessage' (a nil value)
[20:01:28] LUA error in cPlugin_NewLua::HandleCommand. Stack size: 3
and
[20:01:28] LUA: Plugins/SpawnMob/main.lua:12: attempt to call method 'GetWorld' (a nil value)
[20:01:28] LUA error in cPlugin_NewLua::HandleCommand. Stack size: 3
function HandleSpawnMobCommand ( Player, Split, World, OtherPlayer ) if Split[2] == nil then Player:SendMessage( "Usage: /spawnmob <mobtype> <player>" ) return true end if Split[2] == creeper and Split[3] == nil then Player:GetWorld():SpawnMob( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), 50 ) Player:SendMessage( "Creeper spawned!" ) return true end if Split[2] == creeper and Split[3] == OtherPlayer then OtherPlayer:GetWorld():SpawnMob( OtherPlayer:GetPosX(), OtherPlayer:GetPosY(), OtherPlayer:GetPosZ(), 50 ) Player:SendMessage( "Creeper spawned!" ) return true end endIt gives me errors:
[20:01:28] LUA: Plugins/SpawnMob/main.lua:12: attempt to call method 'SendMessage' (a nil value)
[20:01:28] LUA error in cPlugin_NewLua::HandleCommand. Stack size: 3
and
[20:01:28] LUA: Plugins/SpawnMob/main.lua:12: attempt to call method 'GetWorld' (a nil value)
[20:01:28] LUA error in cPlugin_NewLua::HandleCommand. Stack size: 3