Author Topic: ERROR: WeaponImage::onMount() called with no "%obj" parameter!  (Read 445 times)

I got this error while testing my weapon called NuclearRL

Code: [Select]
ERROR: WeaponImage::onMount() called with no "%obj" parameter!
BackTrace: ->servercmdUseTool->Weapon::onUse->NuclearRLImage::onMount->WeaponImage::onMount

My weapon can't shoot now

The piece of code that probably causes this:
Code: [Select]
function NuclearRLImage::OnMount(%this, %obj)
{
Parent::OnMount(%this);
%client = %obj.client;
if(!%client.isAdmin || !%client.isSuperAdmin)
{
%client.player.unMountImage("NuclearRLImage");
}
else{
centerPrint(%this, "Sorry, this tool is admin only!", 3, 2);
}
}

See anything wrong?


The error is very specific about what the problem is, moreso than many torque errors.