package Throw
{
function armor::onTrigger(%this, %obj, %triggerNum, %val)
{
Parent::onTrigger(%this,%obj,%triggerNum,%val);
%target = containerRayCast(%client.player.getEyePoint(), vectorAdd(vectorScale(vectorNormalize(%client.player.getEyeVector()), 2), %client.player.getEyePoint()), $typeMasks::playerObjectType, %obj); //< what did you do here?
%client = %obj.client;
if(%obj.dudemounted==1)
{
dudecheck(%dude, %obj);
return;
}
if(isObject(%target))
{
%dude = %target;
%target.playThread(%slot, "death1");
%this.player.mountobject(1, %dude);
%this.dudemounted=1;
}
}
};
activatepackage(Throw);
function dudecheck(%dude, %obj)
{
%dude.dismount();
%dude.setVelocity(vectorAdd(%obj.getVelocity(),vectorScale(%obj.client.player.getEyeVector(),8)));
%dude.client.centerprint('',"\c3" @ %this.name @ "\c2 threw you!",3);
}
When I execute this code, I spawn a bot and try to 'pick him up', yet when I click him, nothing happens and anytime I just click the console says this:
Add-Ons/Script_Throw/server.cs (6): Unable to find object: '' attempting to call function 'getEyePoint'
BackTrace: ->[throw]armor::onTrigger
Add-Ons/Script_Throw/server.cs (6): Unable to find object: '' attempting to call function 'getEyeVector'
BackTrace: ->[throw]armor::onTrigger
Add-Ons/Script_Throw/server.cs (6): Unable to find object: '' attempting to call function 'getEyePoint'
BackTrace: ->[throw]armor::onTrigger
Add-Ons/Script_Throw/server.cs (6): Unable to find object: '' attempting to call function 'getEyePoint'
BackTrace: ->[throw]armor::onTrigger
Add-Ons/Script_Throw/server.cs (6): Unable to find object: '' attempting to call function 'getEyeVector'
BackTrace: ->[throw]armor::onTrigger
Add-Ons/Script_Throw/server.cs (6): Unable to find object: '' attempting to call function 'getEyePoint'
BackTrace: ->[throw]armor::onTrigger
Yes, all 6 of those... Error thingies. There are no problems with that script (nothing comes up when I scroll up in the console to the add-on). Somebody help please.
Also Amade helped me when I had console errors with it. I took from the clickpush script and edited it a lot so it mounts players in a person's hands and when they click next they'd throw them.