12-02-2014, 05:39 AM
I'm having a problem fixing DisguiseCraft after StringToMobType remove.
Code:
Error:
If I print the mob variable using /d sheep it prints 91 so I see no problem with this
Code:
Code:
function HandleDisguiseCommand(Split, Player)
if Split[2] == nil then
Player:SendMessageInfo("Usage: /d [mobtype]")
else
Mob = cMonster:StringToMobType(Split[2])
print(Mob)
if Mob == mtInvalidType then
Player:SendMessageFailure("Invalid mob type")
else
Player:SetVisible(false)
mobid[Player:GetName()] = Player:GetWorld():SpawnMob(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), Mob) --The line which gives error--
end
end
return true
end
Error:
Code:
[20:34:44] LUA: Plugins/DisguiseCraft/main.lua:42: error in function 'SpawnMob'.
argument #70622632 is array of '[no object]'; array of 'á<§☻♣☺' expected.
[20:34:44] Stack trace:
[20:34:44] [C](-1): SpawnMob
[20:34:44] Plugins/DisguiseCraft/main.lua(42): (no name)
[20:34:44] Stack trace end
[20:34:44] Error in plugin DisguiseCraft calling function <callback>()