hey guys,i post this topic because i have a problem
about selected mob in function attackHook
this is the crash mod
function attackHook (attacker, victim,entityId) {
var breed = getCarriedItem();
var mob = entityId
var XD = 0;
if(breed==296&&mob==11)//selected mob=cow
{
XD = Entity.getAnimalAge(victim) - 24000;
Entity.setAnimalAge(victim,XD);
clientMessage("Sucess!!!");
}
}
if you know how to fix it,please tell me by show the fixed mod in the comment!,thanks to Connor4898 who tell me about setAninalAge,now selected mob please!
about selected mob in function attackHook
this is the crash mod
function attackHook (attacker, victim,entityId) {
var breed = getCarriedItem();
var mob = entityId
var XD = 0;
if(breed==296&&mob==11)//selected mob=cow
{
XD = Entity.getAnimalAge(victim) - 24000;
Entity.setAnimalAge(victim,XD);
clientMessage("Sucess!!!");
}
}
if you know how to fix it,please tell me by show the fixed mod in the comment!,thanks to Connor4898 who tell me about setAninalAge,now selected mob please!
Sincerely
Arqan
Thanks Connor4898,that works!!!^_^